Re: Newbie question: autorelease sends autorelease
Re: Newbie question: autorelease sends autorelease
- Subject: Re: Newbie question: autorelease sends autorelease
- From: Chris Ridd <email@hidden>
- Date: Wed, 22 Sep 2004 08:46:07 +0100
On 22/9/04 8:26 am, j o a r <email@hidden> wrote:
>
> On 2004-09-22, at 08.50, Chris Ridd wrote:
>
>> OK, so what's the answer to the original question then? :-)
>
> Yes, exactly - if I'm so freaking smart, what's the bloody answer? ;)
Heh.
> A quick test tells me that the answer is (a). I could be wrong, but I
> think it's (a).
> This is my guess:
>
> "a" is deallocated in response to a release message sent from
> autorelease pool "p". "a" send autorelease to object "b" in it's
> dealloc method, causing "b" to be added to "p". When "p" continues
> through it's list of objects to release it will eventually reach "b"
> and send it a release message in the same "scope" as "a".
I wonder if that's just luck, and down to a having been added to the pool
before b.
Cheers,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden