RemotingProxy.cs: Do not dispose proxy identity when it is a local
authorLluis Sanchez <lluis@novell.com>
Tue, 11 Nov 2003 01:10:06 +0000 (01:10 -0000)
committerLluis Sanchez <lluis@novell.com>
Tue, 11 Nov 2003 01:10:06 +0000 (01:10 -0000)
  ContextBoundObject proxy.

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

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

index 14376844280e9fc89ee6793e4faccb7823337333..aa83ca1c54a82e9b427a85330a481a3e05351041 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-11  Lluis Sanchez Gual <lluis@ximian.com>
+
+       * RemotingProxy.cs: Do not dispose proxy identity when it is a local
+         ContextBoundObject proxy.
+
 2003-10-21  Lluis Sanchez Gual <lluis@ximian.com>
 
        * RealProxy.cs: In PrivateInvoke() do not try to return the out parameters
index e409e8a4d38f2609ec91d363efc3a7dde7b84ed6..da554d6b1e50065e4ecf603b31d92937c9f4926f 100644 (file)
@@ -50,7 +50,7 @@ namespace System.Runtime.Remoting.Proxies
 
                        if (mMsg.CallType == CallType.EndInvoke)
                                return mMsg.AsyncResult.EndInvoke ();
-
+                               
                        if (mMsg.MethodBase.IsConstructor)
                                return ActivateRemoteObject (mMsg);
 
@@ -108,7 +108,7 @@ namespace System.Runtime.Remoting.Proxies
                        else
                                _targetUri = identity.ObjectUri;
 
-                       if (_objectIdentity.EnvoySink != null) 
+                       if (_objectIdentity.EnvoySink != null)
                        {
                                _sink = _objectIdentity.EnvoySink;
                                _hasEnvoySink = true;
@@ -131,7 +131,10 @@ namespace System.Runtime.Remoting.Proxies
                ~RemotingProxy()
                {
                        if (_objectIdentity != null)
-                               RemotingServices.DisposeIdentity (_objectIdentity);
+                       {
+                               if (!(_objectIdentity is ClientActivatedIdentity))      // Local CBO proxy?
+                                       RemotingServices.DisposeIdentity (_objectIdentity);
+                       }
                }
                
        }