• 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: A quick memory (release) question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A quick memory (release) question


  • Subject: Re: A quick memory (release) question
  • From: Scott Thompson <email@hidden>
  • Date: Wed, 1 Feb 2006 08:30:00 -0600


On Feb 1, 2006, at 3:47 AM, Paul Harvey wrote:

Yes, thanks Scott, that does make sense. With dictionaryWithCapacity, you have not used [NSMutableDictionary alloc], so this is a good sign that it is an autoreleasing setup right?

Right.

Routines that return things you do have to release yourself include alloc, copy, mutableCopy, (and related routines like copyWithZone: ) and (of course) retain.

If you call just about any other routine that returns a new object, that object should have been autoreleased as well. When you set up your own methods, if they create objects they should autorelease them before returning them too

Scott





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: A quick memory (release) question (From: Paul Harvey <email@hidden>)

  • Prev by Date: Using C++ iostreams for file IO in Cocoa
  • Next by Date: Re: How to do multilanguage support
  • Previous by thread: Re: A quick memory (release) question
  • Next by thread: Re: Fake NSMenu-like view
  • Index(es):
    • Date
    • Thread