How are these methods implemented?
Utility methods that return objects send them autorelease message first, but cString does not return an object, it returns a c string. It is just a block of memory. That memory is allocated by the method and yet, the caller (message sender) does not need to release it.
If I wanted to write a similar method, how would I do it?
Utility methods that return objects send them autorelease message first, but cString does not return an object, it returns a c string. It is just a block of memory. That memory is allocated by the method and yet, the caller (message sender) does not need to release it.
If I wanted to write a similar method, how would I do it?