• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie question about deallocing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Newbie question about deallocing? (From: "Collin VanDyck" <email@hidden>)
 >Re: Newbie question about deallocing? (From: j o a r <email@hidden>)

  • Prev by Date: Re: Newbie question about deallocing?
  • Next by Date: Re: applescript transactions
  • Previous by thread: Re: Newbie question about deallocing?
  • Next by thread: NSTextView to Image
  • Index(es):
    • Date
    • Thread