derived class destructors

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Hi All,



When the destructor of a derived class is called, somehow the destructor
of the base class is automatically called at the end. Is there any way to
prevent or bypass this so that only the destructor of the single
inheritance derived class is executed. I am using Microsoft Visual C++
..NET Version 7.1. Many thanks.


--

Gabrielle A. Grün, Ph.D. Student
School of Computing Science
Simon Fraser University
8888 University Drive
Burnaby, BC
V5A 1S6
<http://www.cs.sfu.ca/~grun>


.



Relevant Pages

  • Re: virtual destructor
    ... To get a base class pointer to call a derived class method, ... if the Derived Class constructor creates resources. ... If the base class destructor is NOT virtual, ...
    (comp.lang.cpp)
  • Re: Virtual destructors are unique virtuals right
    ... The destructor of a derived class does not call the ... >> of its base class, regardless of whether the base class has a virtual ... The derived class destructor always calls the base class ...
    (comp.lang.cpp)
  • Re: Inheriting from STL bitset
    ... > baseclass destructor explicitly in my derived class? ... Virtual destructor is needed when you delete an object ... of derived class using a base class pointer. ...
    (comp.lang.cpp)
  • derived class destructor
    ... When the destructor of a derived class is called, ... of the base class is automatically called at the end. ... Simon Fraser University ...
    (microsoft.public.vc.ide_general)
  • Re: pure virtual destructor
    ... Default destructor in a derived class will override the pure destructor ... programmer. ...
    (microsoft.public.vc.language)