Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

id type used as token and Distributed Objects



I have a protocol :

@protocol RSActivityDisplay
- (id) createActivity;
- (void) endActivity:(id)activityToken;

- (void) setActivity:(id)activityToken infoString: (NSString*)inInfoString;
@end


And two processes (client and server if you like) where the protocol is used via Distributed Objects. The (id) value returned by createActivity is an internal class to the server that I have no desire to expose.

setActivity: infoString takes the string and calls an internal method so :

[activityToken setInfoString:inInfoString];

This works fine - I assume because of the use of proxy objects, since the value given for the token doesn't match with what was returned from createActivity

endActivity does:

[activityToken release];

However this doesn't actually lead to dealloc on my underlying object. I assume I'm really just releasing the proxy and it doesn't forward the invocation ? I'm sure I don't have any dangling references of my own making since I've tested this without Distributed Objects and there are no problems.

Reading the documentation it seems like I need the id return value to be handled as 'by reference' ? Is that correct ? I don't need the proxy object - but I can't quite seem to fathom the mechanisms/methods needed for the by reference to be used and/or the proxy to go away.

Thanks

Andrew 8-)

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.