Objective-C Memory management convention

For methods that return objects, the caller may or may not have responsibility to release the returned object.

Method names prefixed with ‘alloc’ ‘copy’ or ‘new’ must be released by the caller.

Objects returned by other method names return autoreleased objects.

Good idea to follow this convention!

Leave a Reply

Your email address will not be published. Required fields are marked *