Re: Yet another memory management question - THANKS
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