3 ms·
The article complicates things by talking about 'autorelease' and '@property'. Neither of these concepts are necessary in understanding memory management in Obj
by dominostars 16y ago
The article complicates things by talking about 'autorelease' and '@property'. Neither of these concepts are necessary in understanding memory management in ObjC, they just add convenience to it.
- jonhendry 16y agoThere are many, many methods that return autoreleased objects, which must be retained if you don't want your app to go boom, so I'd argue that autorelease should be covered. At least to the extent of explaining this. autorelease was added at the same time as the retain/release. @property, on the other hand, came much, much later and is entirely separate.
- dominostars 16y agoI was just pointing out that you don't need to know autorelease is used if you just know to retain anything that isn't a new/init/copy/etc. Also, you don't need to use autorelease, you can just have all your variables return copies. Obviously it's something any Cocoa developer would want to learn, but it didn't seem necessary in an article trying to prove how basic memory management in ObjC is.