Re: Problem with an NSWindowController's retain count
Re: Problem with an NSWindowController's retain count
- Subject: Re: Problem with an NSWindowController's retain count
- From: Will Mason <email@hidden>
- Date: Tue, 19 Jul 2005 13:40:42 -0700 (PDT)
> Here's my -[WSAppDelegate viewerWindowControllers] method:
>
> - (NSMutableArray *)viewerWindowControllers {
> if (viewerWindowControllers == nil) {
> viewerWindowControllers = [[NSMutableArray alloc] init];
> }
> return [viewerWindowControllers autorelease];
> }
This is your problem. The last line of this method should either be:
return viewerWindowControllers;
Or:
return [[viewerWindowControllers retain] autorelease];
You're overreleasing it.
Good luck,
Will
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden