I\'m calling the destructor to deallocate memory but it is not deleting my object. What is the reason behind it?
my code is like this:
class A { publ
Why wouldn't? Your object has been destroyed but its memory space is still around until it goes out of scope, where it will be destroyed again by the way. It's undefined behavior to do what you do.