Suppose I have a class that inherits from another class, and I create a pointer from base class point to derived class object. Now if the base class destructor was defined as virtual, then it wouldn't create any issues. However, in my case the base class destructor was not declared virtual, so when I delete this pointer it will cause memory leaks.
How can I overcome this without modifying base class code?