Re: NSString Retain Count of 2147483647
Re: NSString Retain Count of 2147483647
- Subject: Re: NSString Retain Count of 2147483647
- From: "Sean McBride" <email@hidden>
- Date: Wed, 24 Jun 2009 12:29:02 -0400
- Organization: Rogue Research Inc.
On 6/24/09 10:26 AM, Thomas Wetmore said:
>When I use NSScanners to chop strings up, whenever I pull a one-
>character string out of a scanner that string has a retain count of
>2147483647 (2**32 - 1). My guess is that there are pre-allocated, one-
>character strings for all (most?) characters that are given this
>maximum possible value of a retain count, the digital equivalent of
>infinity.
Returning a large retain count like that is indeed Apple's singleton pattern:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/
TP40002974-CH4-SW32>
As others have said, don't rely on retainCount for much of anything. :)
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden