2 ms·
> There's "autorelease pools" in ObjC but they aren't used to move releasing to an idle time, rather it's to handle cases where nobody knows what the precise li
by gwbas1c 5y ago
> There's "autorelease pools" in ObjC but they aren't used to move releasing to an idle time, rather it's to handle cases where nobody knows what the precise lifetime of the allocation is. Swift has a better ABI that doesn't have that issue.
Autorelease is a no-op when using automatic reference counting. (But it was a pretty cool concept back then.)
- astrange 5y agoIt isn't. There's an optimization that removes things from the pool sometimes, but it doesn't always work, and it's used to pass back out-params like NSError**. What you can't do is message autorelease yourself - although of course you can escape that pretty easily.