Derived destructor called before base destructor causes issue
<p>Here is my issue:</p>

<p>My base class has a constructor that takes in a class pointer, if that pointer is NULL, it knows to instance it itself and maintain it.</p>

<p>The problem is, in the base destructor, I have to unregister that pointer with something private of base. So what happens is when I try to make a call to the class pointer in the base destructor and the derived is maintaining it, it has already been freed. So that causes a problem. What could I do?</p>

<p>Thanks</p>
