On Mon, Nov 2, 2009 at 8:20 AM, Michael Ash wrote:
> Watch out! The 'once' variable must be declared static as well.
> Without it, if you're unlucky to get a zero-filled 'once' every time
> through, this call will appear to work but leak a new Foo every time
> you call it.
Oops. Caveat composewi
On Mon, Nov 2, 2009 at 12:29 AM, Kyle Sluder wrote:
> On Sun, Nov 1, 2009 at 9:19 PM, John Joyce
> wrote:
>> Is it possible to create an NSCharacterSet constant?
>
> No. By definition, constants are assigned values at compile time.
> Objects other than strings can only be created at runtime. Th
On Sun, Nov 1, 2009 at 11:03 PM, John Joyce
wrote:
> I see it as a useful thing to have predefined character sets that don't need
> to be managed.
So you just want more things like +whitespaceCharacterSet? That makes sense.
> At the very least, I will probably submit a radar on adding locale-sp
On Nov 1, 2009, at 11:59 PM, Kyle Sluder wrote:
On Sun, Nov 1, 2009 at 9:50 PM, John Joyce
wrote:
Category, yeah, that's totally one way I thought about, but I was
thinking
more of an enhancement request in Radar. I figured the nature of it
inheriting from NSObject implies there are some k
On Nov 2, 2009, at 12:04 AM, Graham Cox wrote:
On 02/11/2009, at 4:50 PM, John Joyce wrote:
Category, yeah, that's totally one way I thought about, but I was
thinking more of an enhancement request in Radar. I figured the
nature of it inheriting from NSObject implies there are some kind
On 02/11/2009, at 4:50 PM, John Joyce wrote:
Category, yeah, that's totally one way I thought about, but I was
thinking more of an enhancement request in Radar. I figured the
nature of it inheriting from NSObject implies there are some kind of
optimizations under the hood (otherwise we'd j
On Sun, Nov 1, 2009 at 9:50 PM, John Joyce
wrote:
> Category, yeah, that's totally one way I thought about, but I was thinking
> more of an enhancement request in Radar. I figured the nature of it
> inheriting from NSObject implies there are some kind of optimizations under
> the hood (otherwise
On Sun, Nov 1, 2009 at 9:49 PM, Matt Neuburg wrote:
> Why (I'm really asking, not arguing; I don't know anything about GCD) is
> this better than the traditional:
It avoids a race condition if +sharedFoo is called simultaneously from
different threads, and it's wicked fast (Cmd-DoubleClick dispat
On Nov 1, 2009, at 11:32 PM, Graham Cox wrote:
On 02/11/2009, at 4:19 PM, John Joyce wrote:
Is it possible to create an NSCharacterSet constant?
Attempting to do so with the methods for creating an NSCharacterSet
naturally fails to compile with "initializer element is not constant"
I woul
On Sun, 1 Nov 2009 21:29:25 -0800, Kyle Sluder said:
>I'm partial to the following construct:
>
>+ (Foo *)sharedFoo {
> static Foo *sharedFoo;
> dispatch_once_t once;
> dispatch_once(&once, ^{ sharedFoo = [[foo alloc] init]; }
> return sharedfoo;
>}
Why (I'm really asking, not arguing; I don'
On 02/11/2009, at 4:19 PM, John Joyce wrote:
Is it possible to create an NSCharacterSet constant?
Attempting to do so with the methods for creating an NSCharacterSet
naturally fails to compile with "initializer element is not constant"
I would ideally like to be able to do this.
Is it best j
On Sun, Nov 1, 2009 at 9:19 PM, John Joyce
wrote:
> Is it possible to create an NSCharacterSet constant?
No. By definition, constants are assigned values at compile time.
Objects other than strings can only be created at runtime. There is
no way around this fact.
> Is it best just to declare a
12 matches
Mail list logo