Comment by lerno
6 months ago
NSAutoreleasePool keeps a list of autoreleased objects, that are given a "release" message when the pool goes out of scope.
`@pool` flushes the temp allocator and all allocations made by the temp allocator are freed when the pool goes out of scope.
There are similarities, but NSAutoreleasePool is for refcounting and an object released by the autoreleasepool might have other objects retaining it, so it's not necessarily freed.
No comments yet
Contribute on Hacker News ↗