Under what conditions is CCmdTarget::OnFinalRelease called?
问题 The MSDN documentation for the CCmdTarget::OnFinalRelease method is pretty brief: Called by the framework when the last OLE reference to or from the object is released. I have created a sub-class of CCmdTarget class CMyEventHandler : public CCmdTarget { ... } I'm trying to figure out under what conditions the OnFinalRelease method will be called. I have some code that looks something like this: CMyEventHandler* myEventHandler = new CMyEventHandler(); LPUNKNOWN pUnk = myEventHandler-