Re: Proper Memory Management
Re: Proper Memory Management
- Subject: Re: Proper Memory Management
- From: Dave Carrigan <email@hidden>
- Date: Tue, 19 Jan 2010 13:27:44 -0800
On Jan 19, 2010, at 1:20 PM, Jack Carbaugh wrote:
> It is my understanding that, the array returned as "result" would be auto released. Therefore, you would want to retain it for your use, then release it later.
Again, that's impossible to know, without looking at the PerformXPathQuery function. Although, since it was written by Matt, it almost certainly returns an object that you don't own, since it doesn't contain the words copy, new or alloc in it. Whether it returns an autoreleased object or not is orthogonal to the discussion. All you care about is if it returns an object that you own or not. Please go and read the memory management rules at
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994
It fits on a single page and tells you everything you need to know.
--
Dave Carrigan
email@hidden
Seattle, WA, USA
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden