3 ms·
There 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 shoul
by jonhendry 16y ago
There 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.