bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: distant object introspection doesn't work


From: Alexander Malmberg
Subject: Re: distant object introspection doesn't work
Date: Tue, 20 Aug 2002 17:15:41 +0200

> Thanks ... this should be fixed in CVS now.
> 
> At the time when NSProxy was implemented, the behavior of many methods
> was
> undocumented.  Now the MacOS-X documentation covers more methods, and
> makes
> it clear that -isKindOfClass: should be forwarded to the remote object
> (though
> -class apparently should not).
> 
> Sorry it took a while, but I wanted to document NSProxy and correct the
> regression tests too.

These changes broke distant objects (at least in some cases, notably
pasteboards). I tracked down the problem to the
'RELEASE(node->value.obj);' in [NSConnection -removeProxy:]. This only
gets called when the object is being dealloced, so the additional
release here and the new -release implementation in NSProxy cause a
loop. Objects are not retained when they're added to _remoteProxies, so
I don't see why there should be a RELEASE here. Removing it fixes the
problems, so I've done that in cvs.

Also, I think [NSObject -replacementObjectForPortCoder:] is broken,
although it doesn't seem to cause any problems. [self isKindOfClass:
proxyClass] doesn't make any sense; even if it is a proxyClass object,
it will forward the call and return NO anyway. Using -isProxy makes more
sense to me, but I haven't changed anything since it hasn't caused me
any problems.

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]