• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
id type used as token and Distributed Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

id type used as token and Distributed Objects


  • Subject: id type used as token and Distributed Objects
  • From: Andrew Kimpton <email@hidden>
  • Date: Sun, 30 Sep 2007 22:56:35 -0400

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:
This email sent to email@hidden


  • Prev by Date: Re: What cause EXC_BAD_ACCESS?
  • Next by Date: Distributed GUI
  • Previous by thread: Re: How can we draw a NSWindow in a custom NSView?
  • Next by thread: Distributed GUI
  • Index(es):
    • Date
    • Thread