• 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
Re: Newbie question: autorelease sends autorelease
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Newbie question: autorelease sends autorelease (From: j o a r <email@hidden>)

  • Prev by Date: Re: How to validate NSComboBoxCell selection
  • Next by Date: Re: NSAppKitVersionNumber for 10.3.0?
  • Previous by thread: Re: Newbie question: autorelease sends autorelease
  • Next by thread: Re: Newbie question: autorelease sends autorelease
  • Index(es):
    • Date
    • Thread