Re: A quick memory (release) question
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