• 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: create an autorelease pool in the init-method and release it in the dealloc-method ..?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: create an autorelease pool in the init-method and release it in the dealloc-method ..?


  • Subject: Re: create an autorelease pool in the init-method and release it in the dealloc-method ..?
  • From: Nick Zitzmann <email@hidden>
  • Date: Sat, 14 May 2011 22:37:24 -0600

On May 14, 2011, at 8:20 PM, Martin Batholdy wrote:

> So if I understood it correctly;
> (based on  <http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAutoreleasePools.html#//apple_ref/doc/uid/20000047-CJBFBEDI>)
> whenever I add an object to the autorelease pool or don't own the object it gets released automatically after an event cycle.
>
> is that correct?

Almost. Whenever an object is added to the autorelease pool, it gets released when that autorelease pool pops. NSApplication and UIApplication just happen to wrap their event cycles in an autorelease pool.

Nick Zitzmann
<http://www.chronosnet.com/>



_______________________________________________

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

References: 
 >create an autorelease pool in the init-method and release it in the dealloc-method ..? (From: Martin Batholdy <email@hidden>)
 >Re: create an autorelease pool in the init-method and release it in the dealloc-method ..? (From: Nick Zitzmann <email@hidden>)
 >Re: create an autorelease pool in the init-method and release it in the dealloc-method ..? (From: Martin Batholdy <email@hidden>)

  • Prev by Date: Re: NSPostWhenIdle not doing its job?
  • Next by Date: Silly, can I use @max to get the object with the latest date?
  • Previous by thread: Re: create an autorelease pool in the init-method and release it in the dealloc-method ..?
  • Next by thread: Tab Bar Application
  • Index(es):
    • Date
    • Thread