Re: Is dealloc called for an object instantiated with IB?
Re: Is dealloc called for an object instantiated with IB?
- Subject: Re: Is dealloc called for an object instantiated with IB?
- From: "Finlay Dobbie" <email@hidden>
- Date: Sat, 29 Sep 2007 13:46:15 +0100
On 29/09/2007, Bob Ueland <email@hidden> wrote:
> In Hillegass book chapter 4, there is a class called AppController instantiated with IB. In the file AppController.m there is the following method:
>
> - (void)dealloc
> {
> NSLog(@"dealloc");
> [speechSynth release];
> [super dealloc];
> }
> @end
>
>
> However when I run the application and quit it, I never see the text "dealloc" appear in the log window. Does this mean that this method is never called?
Correct. There is no point individually freeing the memory for every
object at application quit time, because the OS will automatically
reclaim all the memory in one big chunk.
If you want to know when your application is quitting, you should use
the applicationWillTerminate: delegate method or
NSApplicationWillTerminate notification.
-- Finlay
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden