* RemotingProxy.cs: Added destructor that unregisters the identity.
authorLluis Sanchez <lluis@novell.com>
Tue, 7 Oct 2003 23:32:52 +0000 (23:32 -0000)
committerLluis Sanchez <lluis@novell.com>
Tue, 7 Oct 2003 23:32:52 +0000 (23:32 -0000)
  Fixes a memory leak.

svn path=/trunk/mcs/; revision=18724

mcs/class/corlib/System.Runtime.Remoting.Proxies/ChangeLog
mcs/class/corlib/System.Runtime.Remoting.Proxies/RemotingProxy.cs

index 2d8e5e3941fcda17982207365e6351616d1d29fd..35f644c091c15ad163266575318327903b8c6598 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-08  Lluis Sanchez Gual <lluis@ximian.com>
+
+       * RemotingProxy.cs: Added destructor that unregisters the identity.
+         Fixes a memory leak.
+
 2003-10-07  Lluis Sanchez Gual  <lluis@ximian.com>
 
        * RealProxy.cs: Fixed support for [out] parameters in async calls.
index f8fd586211f1a964ea0436bc23574d0a7ab3deeb..e409e8a4d38f2609ec91d363efc3a7dde7b84ed6 100644 (file)
@@ -127,5 +127,12 @@ namespace System.Runtime.Remoting.Proxies
                        _ctorCall.CopyFrom (request);
                        return ActivationServices.Activate (this, _ctorCall);
                }
+               
+               ~RemotingProxy()
+               {
+                       if (_objectIdentity != null)
+                               RemotingServices.DisposeIdentity (_objectIdentity);
+               }
+               
        }
 }