How many ways is there to delete a class? There is a default destructor, which can be implemented. I assume delete calls the destructor.
If you have two destructors, how does delete know which destructor to call? It doesn't. Besides, you can put a conditional statement inside the destructor and only execute part of it, effectively combining two destructors into one.
I suppose there may be pointers to objects that are still active and should not be deleted, which may lead to conditional deletion of class members.
Regardless, one destructor is sufficient. I don't think that qualifies as overloading. You should have two or more implementations for overloading.
Comment