2 ms·
Managing memory in Objective C is pretty simple once you learn the rules - namely, if you retain it, release it. People who write bad code won't stop writing ba
by danudey 17y ago
Managing memory in Objective C is pretty simple once you learn the rules - namely, if you retain it, release it. People who write bad code won't stop writing bad code just because there's GC available.
All that adding a GC would do is move the burden of releasing memory to the GC thread; what would result is that in low-memory conditions (or when the GC runs naturally), you'd have a sudden performance hit as the GC churns through the objects in memory looking for free-able objects. On the desktop, this might not be as much of a performance hit, but on a mobile platform I can see this being an issue.
Likewise, the GC can only do so much. If a developer creates an array and starts stuffing objects into it, but never releases/unreferences the array, those objects will likewise never be deallocated. The onus is still on the developer to write proper code, but now they've voluntarily given up control of memory to a separate process that may not understand the code as well as they do.
Besides all of that, I haven't found iPhone apps to be unreliable at all. The apps I use are generally polished and work fantastically, and crashes are extremely rare (and most of those are due to OOM conditions directly attributed to WebViews).
- j_baker 17y agoI'd really rather not start this debate. Suffice it to say that there are effects that 3.3.1 has other than just blocking Flash.