discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: Dealloc Notification]


From: Richard
Subject: [Fwd: Dealloc Notification]
Date: Tue, 13 Nov 2001 17:35:59 +0000

Richard wrote:
> 
> Gerrit Van Dyk wrote:
> >
> > Hi all,
> >
> > Is there a way of registering an object to get notified when another object
> > deallocs? I am busy rewriting some of the code in the Database Library and I
> > need to know when an object gets deallocated
> 
> There is an NSObject method 'setDeallocNotificationsActive:' you can
> use.
> 
> If you set thhis to YES, then the _dealloc method will be called
> whenever
> an objects retain count is decreased to zero, and the result of _dealloc
> will be used to determine if dealloc is actually called (the default
> implementation returns YES).
> 
> You can therefore override _dealloc in any class that you want to send a
> notification, or you can implement _dealloc to send notifications in a
> category of NSObject.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]