• 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 Memory Questions on a Code Fragment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Newbie Memory Questions on a Code Fragment (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Newbie Memory Questions on a Code Fragment
  • Next by Date: Re: Setting the result of a javascript function to NSString
  • Previous by thread: Re: Newbie Memory Questions on a Code Fragment
  • Next by thread: Limiting NSTextField to numbers?
  • Index(es):
    • Date
    • Thread