I am getting the following error when I try to compile some code from a Third-party SDK.
*Description Resource Path Location Type
deleting object of
You cannot safely use a pointer to the base class, unless it has a virtual destructor declared on the base class. Since this is a vendor library, you can not add the virtual destructor needed.
If the library itself does not create subclasses of this object, you may be able to get the effect you need by declaring a subclass for this object and use that object as a base class.
class NotGoodBase {
~NotGoodBase(); // Non-virtual destructor. Possibly added by compiler.
};
class UseThisAsBase : public NotGoodBase {
virtual ~UseThisAsBase(); // Virtual destructor.
};
You should be able to use pointers of type UseThisAsBase anywhere that you could use NotGoodBase, except places where you need to have an LValue of type NotGoodBase, such as an assignment or when passing a variable by reference.