Re: Newbie Memory Questions on a Code Fragment
Re: Newbie Memory Questions on a Code Fragment
- Subject: Re: Newbie Memory Questions on a Code Fragment
- From: Scott Ribe <email@hidden>
- Date: Wed, 21 Jan 2009 08:38:44 -0700
- Thread-topic: Newbie Memory Questions on a Code Fragment
You just need to know basic C and follow the very simple rules and not
needlessly complicate things.
- initWithObjects gives a perfectly good (and already retained)
array--there's no need to put it into a temp variable and then try to copy
it
- if listOfMonthNames is nil, then you would need to alloc & init an array
and assign to it--you can't call arrayByAddingObjectsFromArray on something
that's not an array and expect it to work
- what is listOfMonthNames2?
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/TasksM
emoryManagementRules.html>
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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