Re: View deallocation
Re: View deallocation
- Subject: Re: View deallocation
- From: Eric Wang <email@hidden>
- Date: Fri, 27 Jun 2003 14:06:40 -0400
on 6/27/03 1:01 PM, Neil Earnshaw at email@hidden wrote:
>
I've just created a new project using the PB Cocoa Application
>
template. Then I went into IB and stuck a custom view in the window.
>
The custom view was just a subtype of NSView with no extra features. I
>
saved that lot and added
>
>
-(void)dealloc
>
{
>
NSLog(@"dealloced");
>
[super dealloc];
>
}
>
>
I ran the application and closed the window. The log message was not
>
printed. If I run the app in ObjectAlloc the view's count remains 1
>
when I close the window.
>
>
Shouldn't the view be dealloc'd?
>
>
Neil
Hi Neil,
Did you check the "Release when closed" checkbox for the window in IB? If
you aren't using NSWindowController to manage the window, you'll have to
release the window yourself after you're done with it.
Eric Wang
_______________________________________________
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.