• 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: Garbage collection, core data, and tight loops
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Garbage collection, core data, and tight loops


  • Subject: Re: Garbage collection, core data, and tight loops
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 3 Nov 2007 18:59:54 -0700

On Nov 2, 2007, at 12:01 PM, John R. Timmer wrote:

Using an autorelease pool for each batch worked well, keeping memory use extremely low.

One other tip: Switch from using [pool release] to using [pool drain] for your NSAutoreleasePool instances, and see how that affects the version of your application running under garbage collection. It will look "wrong" at first (since you'll no longer be balancing the [[NSAutoreleasePool alloc] init] with a -release) but the -drain message will *not* be consumed by the runtime under GC as -release will. Instead, it actually provides a hint to the collector that you it may be a good time to pick up some newly-generated garbage.


  -- Chris



_______________________________________________

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: 
 >Re: Garbage collection, core data, and tight loops (From: "John R. Timmer" <email@hidden>)

  • Prev by Date: Re: [Leopard] Interface Builder - Subclassing
  • Next by Date: Re: Why initialize the menubar without Interface Builder
  • Previous by thread: Re: Garbage collection, core data, and tight loops
  • Next by thread: Re: Garbage collection, core data, and tight loops
  • Index(es):
    • Date
    • Thread