Memory leak in this case?
Suppose I have a component (class) CX implements IUnknown interface, and I have retrieved a pointer of CX by IUnknown pointer (IUnknown*), that is.
Even if I declare the component CX's destructor as virtual, if I delete through IUnknown pointer to "release" the object, there is still potential memory and resource leak, because in IUnknown interface, destructor is the compiler provided default one, which is non-virtual and public, right?
QueryInterface (IID_IUnknown, &pCX);
delete pCX; // memory and resource leak here?
thanks in advance,