Re: -init is not being called on my custom class
Re: -init is not being called on my custom class
- Subject: Re: -init is not being called on my custom class
- From: mw <email@hidden>
- Date: Sun, 09 Feb 2003 11:31:21 -0500
On 2/9/03 11:23 AM, "Shaun Wexler" <email@hidden> wrote:
>
On Sunday, February 9, 2003, at 06:34 AM, mw wrote:
>
> + (id)alloc
>
> {
>
> if (!sharedInstance) {
>
> self = [super init];
>
> return self;
>
> } else {
>
> return nil;
>
> }
>
> }
>
>
self = [super alloc];
>
>
Without calling [NSObject alloc] you're not allocating memory space (ie
>
not creating an object), so there is nothing to init.
Ahh, okay thanks! Another stupid mistake on my part...
mw
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.