Re: 4.5 question - _holdMe array trick
Re: 4.5 question - _holdMe array trick
- Subject: Re: 4.5 question - _holdMe array trick
- From: "b.bum" <email@hidden>
- Date: Thu, 21 Aug 2003 13:28:04 -0700
On Thursday, August 21, 2003, at 2:16 , Adam Chan wrote:
Do you mean some release(retain) issue?
If so yes adding an object to the NSArray(NSDictionary) will increase
the
object's retain count by 1 thus prevent it from being released, but
you can
simply put [myObj retain] instead directly (and remember to release it
later).
Not if it is a pure Java object that has been proxied to the other side
of the bridge. In that case, it is generally the proxy that is being
released inappropriately.
Shoving the object-- whether sourced from ObjC or Java-- into a mutable
array is a good way to consistently ensure that the retain count has
been bumped.
This works quite well in Cocoa/Java to ensure things like notification
observers or controller objects stick around.
b.bum
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.