COleDispatchDriver::m_bAutoRelease
If TRUE, the COM object accessed by m_lpDispatch will be automatically released when ReleaseDispatch is called or when this COleDispatchDriver object is destroyed.
BOOL m_bAutoRelease;
Заметки
By default, m_bAutoRelease is set to TRUE in the constructor.
For more information on releasing COM objects, see Implementing Reference Counting and IUnknown::Release in the Windows SDK.
Пример
// Clean up by forcing Release to be called
// on COleDispatchDriver object and delete
if (bError)
{
pDisp->m_bAutoRelease = TRUE;
delete pDisp;
pDisp = NULL;
}
Требования
Header: afxdisp.h
См. также
Основные понятия
COleDispatchDriver::AttachDispatch