Re: dealloc not beeing called... why?
Re: dealloc not beeing called... why?
- Subject: Re: dealloc not beeing called... why?
- From: Development <email@hidden>
- Date: Tue, 9 Jul 2002 16:34:30 +0200
Hi,
Am Montag den, 8. Juli 2002, um 14:38, schrieb Ondra Cada:
Presumed you not only subclased the object in IB, but instantiated it
there too, and use it as an application controller, right?
Right.
There is thus no outlet to this instance anywhere; it gets created when
the NIB is loaded, and exists till application quits, right?
Well, if so... since you don't ever free the object, its dealloc
doesn't get called. It's that simple.
OK, but I thought, the OS would care about the deallocation of the
object. It has the -dealloc method already built-in and whoever created
the instance of my subclasses NSObject after NIB load has to call this
-dealloc method eventually, no?!
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...
Maybe to intercept some kind of message?
Better subclass NSApplication instead of NSObject to have better control
over app runtime?
tia,
Dirk Stegemann
_______________________________________________
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.