Re: Newbie question about deallocing?
Re: Newbie question about deallocing?
- Subject: Re: Newbie question about deallocing?
- From: "Collin VanDyck" <email@hidden>
- Date: Thu, 15 Jan 2004 11:47:56 -0500
That makes sense. Thanks. And I will try and do a better job of searching
the archives next time.
----- Original Message -----
From: "j o a r" <email@hidden>
To: "Collin VanDyck" <email@hidden>
Cc: <email@hidden>
Sent: Thursday, January 15, 2004 11:41 AM
Subject: Re: Newbie question about deallocing?
>
The answer to this question can be found (several times) in the list
>
archives.
>
>
The basic idea is that since all resources used by the application will
>
be reclaimed in an efficient manner by the OS when the application is
>
quit, there is no reason to explicitly deallocate every single object
>
at this time.
>
If you need to perform specific actions when an object is removed, you
>
need to listen to the "app will terminate" notification (read the docs
>
for NSApplication).
>
>
j o a r
>
>
On 2004-01-15, at 17.22, Collin VanDyck wrote:
>
>
> I've got a regular NSApplication built through XCode and Interface
>
> Builder.
>
> It is a Cocoa Application, and I have instantiated a subclass of
>
> NSObject
>
> (AppController) to act as the main controller for my application.
>
>
>
> In my AppController.m file, I have the following method defined:
>
>
>
> - (void) dealloc
>
> {
>
> NSLog(@"App Controller deallocating");
>
> [_downloads release];
>
> [_preferenceController release];
>
> [super dealloc];
>
> }
>
>
>
> However, I never see this method called. "App Controller
>
> deallocating" never
>
> gets written to the console. I would expect that when I quit the
>
> application
>
> that my objects that I had instantiated through Interface Builder would
>
> receive a dealloc method call.
>
>
>
> I have my app controller acting as a delegate for File's Owner, but I
>
> don't
>
> think that would cause this issue.
>
>
>
> Any ideas?
_______________________________________________
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.