[Mono-bugs] [Bug 81710][Maj] Changed - SqlClient Command.Dispose closing connection

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri May 25 10:16:39 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by amc1999 at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=81710

--- shadow/81710	2007-05-22 17:19:20.000000000 -0400
+++ shadow/81710.tmp.22554	2007-05-25 10:16:39.000000000 -0400
@@ -2,13 +2,13 @@
 Product: Mono: Class Libraries
 Version: unspecified
 OS: All
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Major
 Component: Sys.Data.SqlClient
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: amc1999 at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -57,6 +57,23 @@
 
 How often does this happen? 
 always
 
 Additional Information:
 SqlCommand.Dispose() also called indirectly through IDbDataAdapter.Dispose()
+
+------- Additional Comments From amc1999 at gmail.com  2007-05-25 10:16 -------
+Tested fix:
+        protected override void Dispose (bool disposing)
+        {
+            if (disposed) return;
+            
+            if (disposing) {
+                parameters.Clear();
+                transaction = null;
+                connection = null;
+            }
+            
+            base.Dispose(disposing);
+            disposed = true;
+        }
+would be nice to see it in the next mono version


More information about the mono-bugs mailing list