• 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: Release autoreleased object now
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Release autoreleased object now


  • Subject: Re: Release autoreleased object now
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 8 Oct 2010 10:11:40 -0700

On Oct 8, 2010, at 9:58 AM, Jonny Taylor <email@hidden> wrote:

> The problem is coming from OS functions such as [image TIFFRepresentation] that return autoreleased objects, so it is obviously considered ok to autorelease large chunks of memory. My question is whether I can tell the OS to release the memory *now* rather than waiting until the pool is drained. At the moment I am bracketing the relevant parts with my own autorelease pools, but that is getting a bit tedious. I would like just to be able to call [imageRep releaseNow] or something. I suspect that just calling 'release' on the autoreleased memory would be a Bad Idea.

No, you cannot force an autorelease pool to release its contents without calling -drain. Wrapping the autorelease-intensive portions of your code is the correct approach.

--Kyle Sluder_______________________________________________

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: 
 >Release autoreleased object now (From: Jonny Taylor <email@hidden>)

  • Prev by Date: Release autoreleased object now
  • Next by Date: Re: [iPhone] Changing iPhone Application Language Programatically.
  • Previous by thread: Release autoreleased object now
  • Next by thread: Not understanding NSString's compare:options:range:locale: method
  • Index(es):
    • Date
    • Thread