FROM : Chris Hanson
DATE : Sun Nov 04 02:59:54 2007
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
DATE : Sun Nov 04 02:59:54 2007
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
| Related mails | Author | Date |
|---|---|---|
| John R.Timmer | Oct 30, 22:03 | |
| Bill Bumgarner | Oct 30, 22:56 | |
| John R. Timmer | Oct 31, 13:37 | |
| Bill Bumgarner | Oct 31, 16:31 | |
| Ben Trumbull | Nov 1, 03:41 | |
| John R. Timmer | Nov 2, 20:01 | |
| Ben Trumbull | Nov 4, 01:26 | |
| Chris Hanson | Nov 4, 02:59 | |
| John R. Timmer | Nov 4, 05:06 |






Cocoa mail archive

