• 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: dealloc not beeing called... why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: dealloc not beeing called... why?


  • Subject: RE: dealloc not beeing called... why?
  • From: "Jonathan E. Jackel" <email@hidden>
  • Date: Tue, 9 Jul 2002 15:51:46 -0400

> > If not, what's the right time and where's the right place to call the
> > objects -dealloc method, i.e. is there a recommended way to do this? I
> > have to do some clean up before quitting the app...
>
> I think calling dealloc directly is not recommended. Try
> applicationWillTerminate:, NSApplicationWillTerminateNotification (both
> already suggested) or maybe override NSApplication's dealloc method.

That's exactly right. From the NSObject docs:

"You never send a dealloc message directly. Instead, an object's dealloc
method is invoked indirectly through the release NSObject protocol method.
See the introduction to 'The Foundation Framework' for more details on the
use of these methods."

http://developer.apple.com/techpubs/macosx/Cocoa/Reference/Foundation/ObjC_c
lassic/Classes/NSObject.html#//apple_ref/occ/instm/NSObject/dealloc

Jonathan
_______________________________________________
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: 
 >Re: dealloc not beeing called... why? (From: James DiPalma <email@hidden>)

  • Prev by Date: Re: Database Suggestions
  • Next by Date: NSTextStorage and Insertion Point - repost
  • Previous by thread: Re: dealloc not beeing called... why?
  • Next by thread: ld: undefined symbol _main (but a main does exist)
  • Index(es):
    • Date
    • Thread