RE: dealloc not beeing called... why?
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.