projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2373 from akoeplinger/servicemodel-tcpreplychannel-race
[mono.git]
/
mcs
/
class
/
System.Data.OracleClient
/
System.Data.OracleClient
/
OracleConnectionPool.cs
diff --git
a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPool.cs
b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPool.cs
index 1602fd500ca4d3a610faf037269f4e88e26d384b..195275afd8e338bcb97660c3331925e1a7ab6b63 100644
(file)
--- a/
mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPool.cs
+++ b/
mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPool.cs
@@
-97,21
+97,16
@@
namespace System.Data.OracleClient
return manager.CreateConnection (info);
}
return manager.CreateConnection (info);
}
- ~OracleConnectionPool ()
+ public void Dispose ()
{
if (list != null) {
{
if (list != null) {
- if (list.Count > 0) {
- for (int c = 0; c < list.Count; c++) {
- // There are available connections in the pool
- OciGlue connection = (OciGlue)list [c];
- list.RemoveAt (c);
- if (connection.Connected) {
+ if (list.Count > 0)
+ foreach (OciGlue connection in list)
+ if (connection.Connected)
connection.Disconnect ();
connection.Disconnect ();
- connection = null;
- }
- }
- }
- }
+ list.Clear ();
+ list = null;
+ }
}
}
}
}
}
}