Re: newbie question
Re: newbie question
- Subject: Re: newbie question
- From: "Alan Smith" <email@hidden>
- Date: Fri, 10 Nov 2006 11:37:40 -0500
Hi Maximilian,
One thing I didn't realize for quite some time when I was first
learning how to use the Cocoa frameworks is that all methods that have
the plus before them, should, return an autoreleased instance.
Autoreleased objects are not something you should use a lot of because
they don't get released until your program quits, or sooner if you're
controlling the pool and specifically release it.
I prefer: NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
// Lots of code
[dict release];
Over: NSMutableDictionary *dict = [NSMutableDictionary dictionary];
Keeping your memory clean makes your program faster and look better.
Peace, Alan
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unimportant, then it
shall evolve."
_______________________________________________
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