On 27 Jun '08, at 8:51 PM, Shawn Erickson wrote:

Could I assume if the doc does not mention releasing the memory, then I
don't have to worry about it?

No :)

Well, to respond a bit more positively, it's not what the doc says so much as what the method's named, that tells you what its behavior is.

In general, only the methods "alloc", "new", "copy" and "mutableCopy" create references that you're responsible for releasing. In all other cases you're not responsible for releasing the object returned; either it belongs to another object already, or it's already been autoreleased so it'll be cleaned up later.

There are some details/subtleties (some having to do with the exact lifespan of a returned object) but the above is most of what you need to keep in mind.

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to