• 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: Newbie: How to know whether an object is in autorelease pool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: How to know whether an object is in autorelease pool


  • Subject: Re: Newbie: How to know whether an object is in autorelease pool
  • From: mmalc crawford <email@hidden>
  • Date: Tue, 11 Dec 2007 21:43:55 -0800


On Dec 11, 2007, at 9:38 PM, norio wrote:

I know that class factory puts its instance into autorelease pool.
But I still don't know whether the other methods like subdataWithRange of NSData is put in the pool or not.


You don't need to know whether an object is in an autorelease pool, you just need to know whether you own it...

Carbon documentation describes who needs to release the returned object, but not Cocoa's.
I'm always confused with this.


... Cocoa -- and the Cocoa documentation -- follows a simple set of rules given here:

<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html >

Memory management is only commented on in the documentation if a method does not follow these rules.

mmalc

_______________________________________________

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: 
 >Newbie: How to know whether an object is in autorelease pool (From: norio <email@hidden>)

  • Prev by Date: Newbie: How to know whether an object is in autorelease pool
  • Next by Date: Re: Newbie: How to know whether an object is in autorelease pool
  • Previous by thread: Newbie: How to know whether an object is in autorelease pool
  • Next by thread: Re: Newbie: How to know whether an object is in autorelease pool
  • Index(es):
    • Date
    • Thread