4 ms·
Apple's pools are for helping manage reference counts of returned objects (via autorelease) but aren't doing pool allocation (as any of those objects could esca
by saurik 6y ago
Apple's pools are for helping manage reference counts of returned objects (via autorelease) but aren't doing pool allocation (as any of those objects could escape, so you can't do the fast thing of just deallocating the pool). The normal memory allocator is used while in the scope of an autorelease pool.
- projektfu 6y agoTrue, I was thinking the same after I posted. Maybe I’m thinking more of Apache’s approach and how it gets some of the benefits of a fork-per-request server without the overhead.
- andrekandre 6y agoright, so if you do @autoreleasePool { [[[SomeObject alloc] init] autorelease]; }//someobject is release after exiting this scope //inside main runloop, not inside @autorelease{} [[[AnotherObject alloc] init] autorelease]; //AnotherObject will be release at end of main runloop [[NotAutoreleased alloc] init]; //will leak past runloop iteration is that understanding correct?