• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Proper Memory Management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Proper Memory Management (From: Philip Vallone <email@hidden>)
 >Re: Proper Memory Management (From: Dave DeLong <email@hidden>)
 >Re: Proper Memory Management (From: Dave Carrigan <email@hidden>)
 >Re: Proper Memory Management (From: Philip Vallone <email@hidden>)
 >Re: Proper Memory Management (From: Jack Carbaugh <email@hidden>)

  • Prev by Date: Re: Proper Memory Management
  • Next by Date: Re: NSDictionary trouble
  • Previous by thread: Re: Proper Memory Management
  • Next by thread: Re: Proper Memory Management
  • Index(es):
    • Date
    • Thread