Re: 4.5 question - _holdMe array trick
Re: 4.5 question - _holdMe array trick
- Subject: Re: 4.5 question - _holdMe array trick
- From: "Robert A. Decker" <email@hidden>
- Date: Thu, 21 Aug 2003 13:55:25 -0700 (PDT)
I'm actually working in Java. We occasionally see an object being
collected underneath us in java (for example, occasional 'Message sent to
object whose editing context has been freed' messages).
I also saw this when I was doing something in a separate thread - had to
stick an entity in aan NSArray in order to make sure it didn't disappear
on me while the thread was running. (this one was 100% reproducible,
unlike the other times we see this)
I just wanted to make sure that NSDictionary is also a bridged object,
like NSArray - in which case I think I'll get the same benefits I get from
NSArray.
thanks,
Robert A. Decker
http://www.robdecker.com/
On Thu, 21 Aug 2003, 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).
>
>
> ----- Original Message -----
> From: "Robert A. Decker" <email@hidden>
> To: "Web Objects Developer" <email@hidden>;
> <email@hidden>
> Sent: Thursday, August 21, 2003 2:03 PM
> Subject: 4.5 question - _holdMe array trick
>
>
> > We've found that if we occasionally have a problem with something being
> > collected out from underneath us, the problem is solved by sticking the
> > item in an NSArray. I assume this is a bridge issue.
> >
> > Does anyone know if you can get the same fix with an NSDictionary?
> _______________________________________________
> 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.
_______________________________________________
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.