3 ms·
You don't have to do that on the iPhone. There's this magic thing called "autorelease". Call it on an object, and it'll release itself (and its memory) someti
by Xuzz 16y ago
You don't have to do that on the iPhone.
There's this magic thing called "autorelease".
Call it on an object, and it'll release itself (and its memory) sometime in the future, after the current call stack (probably sometime a few runloops ahead). Most things come pre-autoreleased for you, the only time you ever have to manage memory yourself is if you are storing it inside the instance variables of an object, at which point you just have to remember to add a line to the destructor to free it.