non virtual TObject::~TObject()

From: Pasha Murat (murat@cdfsga.fnal.gov)
Date: Fri Apr 10 1998 - 04:50:08 MEST


William J Deninger writes:
 > Fred Gray has recently informed me of the procedure by which destructors are called and the difference between virtual and non virtual destructors implementation.
.... snip
 > 
 > If this is correct, shouldn't root classes (such as TObject or any root class allowed to be inherited) have their destructors implemented as virtual?  

	Hi William, 

what Fred Gray told you is correct. Let me guess that 
destructors of the classes like TObject, TArray etc *ARE* implemented 
as virtual for this very reason. For example TObject.h says:

.... snip
public:
   virtual ~TObject();
						Regards, Pasha.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:31 MET