Re: NSString initWithUTF8String - crazy retainCount with empty string
Re: NSString initWithUTF8String - crazy retainCount with empty string
- Subject: Re: NSString initWithUTF8String - crazy retainCount with empty string
- From: mmalc crawford <email@hidden>
- Date: Sat, 24 Mar 2007 08:40:10 -0700
On Mar 24, 2007, at 8:33 AM, Simon Strandgaard wrote:
I have asserts on retainCount a few places in my code,
and today I got surprised that with NSString sets a weird
retainCount when initialized with an empty string.
It looks like a bug to me?
Why are you looking at the retain count?
The only thing you should typically be interested in is, are you
adhering to the memory management rules?
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html
>
So what's the safe way to get a NSString from a cstring?
<http://developer.apple.com/documentation/Cocoa/Conceptual/Strings/Articles/CreatingStrings.html
>
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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