Re: NSString uppercaseString

2008-06-27 Thread Tito Ciuro
Hi Sam, It's autoreleased. Make sure you read this document, as it'll answer many of your questions: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html -- Tito On 27 Jun 2008, at 5:56 AM, Sam Mo wrote: Newbie here: I am looking at

Re: NSString uppercaseString

2008-06-27 Thread Uli Kusterer
Am 27.06.2008 um 15:15 schrieb Tito Ciuro: It's autoreleased. No, there's no guarantee that it's autoreleased. All that's guaranteed is that you do not own it. This still means there'll be no leak and you shouldn't call release on it, but assuming it' autoreleased would be assuming a

Re: NSString uppercaseString

2008-06-27 Thread matt . gough
On 27 Jun 2008, at 3:30pm, Uli Kusterer wrote: If you read the documentation closely, you'll see that it would be perfectly valid to implement this method so the string goes away when the original (non-uppercase) string is released. Hmmm, not sure I'd read it that way (depending on what

Re: NSString uppercaseString

2008-06-27 Thread Tito Ciuro
Uli, As Matt also points out, the documentation is not always crystal- clear, so I was simply trying to answer Sam's specific question. Since not all APIs behave the same way I added the link to the Memory Management Programming Guide for Cocoa page, hoping to help Sam. In any case, it

Re: NSString uppercaseString

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 8:37 PM, Sam Mo [EMAIL PROTECTED] wrote: Could I assume if the doc does not mention releasing the memory, then I don't have to worry about it? No :) Read and understand the memory management programming guide for Cocoa. Cocoa memory management is easy and consistent so

Re: NSString uppercaseString

2008-06-27 Thread Jens Alfke
On 27 Jun '08, at 8:51 PM, Shawn Erickson wrote: Could I assume if the doc does not mention releasing the memory, then I don't have to worry about it? No :) Well, to respond a bit more positively, it's not what the doc says so much as what the method's named, that tells you what its