Author: kostat
Date: 2005-05-01 05:58:28 -0400 (Sun, 01 May 2005)
New Revision: 43836

Modified:
   branches/Mainsoft.System.Data/mcs/class/System.Data/ChangeLog
   
branches/Mainsoft.System.Data/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
Log:
Rostore the Dispose logic

Modified: branches/Mainsoft.System.Data/mcs/class/System.Data/ChangeLog
===================================================================
--- branches/Mainsoft.System.Data/mcs/class/System.Data/ChangeLog       
2005-04-30 23:27:05 UTC (rev 43835)
+++ branches/Mainsoft.System.Data/mcs/class/System.Data/ChangeLog       
2005-05-01 09:58:28 UTC (rev 43836)
@@ -1,3 +1,7 @@
+2005-01-05  Konstantin Triger <[EMAIL PROTECTED]>
+       
+       * DbDataAdapter.cs: Rostore the Dispose logic
+
 2005-04-28  Konstantin Triger <[EMAIL PROTECTED]>  Sureshkumar T  <[EMAIL 
PROTECTED]>
 
        * DataView.cs: Nullify an index when Closed

Modified: 
branches/Mainsoft.System.Data/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
===================================================================
--- 
branches/Mainsoft.System.Data/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
     2005-04-30 23:27:05 UTC (rev 43835)
+++ 
branches/Mainsoft.System.Data/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
     2005-05-01 09:58:28 UTC (rev 43836)
@@ -163,12 +163,24 @@
                {
                        if (disposing) {
                                IDbDataAdapter da = (IDbDataAdapter) this;
+                               if (da.SelectCommand != null) {
+                                       da.SelectCommand.Dispose();
                                        da.SelectCommand = null;
+                               }
+                               if (da.InsertCommand != null) {
+                                        da.InsertCommand.Dispose();
                                        da.InsertCommand = null;
+                               }
+                               if (da.UpdateCommand != null) {
+                                       da.UpdateCommand.Dispose();
                                        da.UpdateCommand = null;
+                               }
+                               if (da.DeleteCommand != null) {
+                                       da.DeleteCommand.Dispose();
                                        da.DeleteCommand = null;
                                }
                        }
+               }
 
 #if NET_2_0
                [MonoTODO]

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to