Destructor overloading ?

closed account (z0XLy60M)
Like a constructor ...
Can a destructor be overloaded ?

Pls give reasons too...
No, destructors cannot be overloaded.
closed account (z0XLy60M)
And why is that..?

Is it not possible for a destructor to destruct in different ways..?
And why is that..?

Because it is not implemented.

If you want to perform a particular task before deleting an object you can implement a Delete() of maybe Destruct() method for your class and call it manually
closed account (z0XLy60M)
Yes, a destructor can be overloaded.

You should make the base destructor virtual. That guarantees that the destructors of all derived classes are called.

The destructor has of course only one form
because it's called automatically
coder777: You're confusing overloaded and overridden.
closed account (z0XLy60M)
hmmm ...what exactly could be the use of that ...?
making it virtual ?

I don't think it classifies as "overloading"
Topic archived. No new replies allowed.