In article <My*******************@newsb.telia.net>,
jo*****************@telia.com says...
Hello!!
Is it possible to have abstract destructor.
Hopefully you really mean virtual destructor. In that case, the
answer is yes. A virtual destructor is necessary if you might ever
delete an instance of a derived class via a pointer or reference to
the base class.
Alternatively, you might mean a pure virtual destructor, which would
make this an abstract base class. In that case the answer is still
yes. The same condition as above applies here as well, but in this
case (is with any other pure virtual function) the function must be
overridden in some derived class for objects to be instantiated. IOW,
just like any other Abstract Base Class, this one can't be
instantiated itself -- it just defines an interface that will be
supported by derived classes.
--
Later,
Jerry.
The universe is a figment of its own imagination.