[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about memory management

From: Graham Lee
Subject: Re: Question about memory management
Date: Fri, 7 Jun 2013 09:30:26 +0100

On 7 Jun 2013, at 09:26, "David Chisnall" <address@hidden> wrote:

> My preferred pattern is:
> + (void)initialize
> {
>    [[self alloc] init];
> }

Should this be wrapped in if(self == [Singleton class])? I've seen that used to 
guard against this +initialize being called multiple times when a subclass is 
used that doesn't override the method.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]