But the book says that the latter returns an autoreleased string object. OK, cool. But why does the documentation for either method or the class fail to mention that?!
Is there a rule of thumb that class methods other than alloc, new, copy or mutableCopy always return autoreleased objects (as Aaron suggests)? If so, how reliable is this rule? Would be nice to know.
I know that this point is mostly moot with garbage collection in Objective-C 2.0, but still. I want to learn the good ol' laborious retain counting way as well (and also, I hear GC isn't suitable in all circumstances).
By the way, I'm at Chapter 3. Building a Foundation tool.
No comments:
Post a Comment