• 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: Yet another memory management question - THANKS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yet another memory management question - THANKS


  • Subject: Re: Yet another memory management question - THANKS
  • From: Sherm Pendley <email@hidden>
  • Date: Fri, 8 Sep 2006 14:49:29 -0400

On Sep 8, 2006, at 2:05 PM, Bruce Truax wrote:

Thanks joar, now I see what I was doing. It is quite obvious once someone
points out the problem. And Thanks Greg for the streamlined code, it works
great. I do have one question related to the following sequence:


NSString *tempString

tempString = [variable capitalizedString];

Am I correct in assuming that [variable capitalizedString] automatically
creates and allocates a new autoreleased string?

It may not create a new string at all - it might scan the string and simply return self directly if the string is already capped. You don't know, and more importantly, you don't *need* to know, if the object that's returned has been autoreleased. All you can know is that *you* are not responsible for releasing it later.


sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


_______________________________________________ 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: Yet another memory management question - THANKS (From: Bruce Truax <email@hidden>)

  • Prev by Date: Re: [CodeData] Generic model migration code?
  • Next by Date: cursor rects
  • Previous by thread: Re: Yet another memory management question - THANKS
  • Next by thread: Categories to help with organization
  • Index(es):
    • Date
    • Thread