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
d...@rudedog.org
Seattle, WA, USA

_______________________________________________

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 arch...@mail-archive.com

Reply via email to