Compartir a través de


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;

Remarks

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.

Example

// Clean up by forcing Release to be called
// on COleDispatchDriver object and delete
if (bError)
{
   pDisp->m_bAutoRelease = TRUE;
   delete pDisp;
   pDisp = NULL;
}

Requirements

Header: afxdisp.h

See Also

Reference

COleDispatchDriver Class

Hierarchy Chart

COleDispatchDriver::AttachDispatch

COleDispatchDriver::ReleaseDispatch

COleDispatchDriver::m_lpDispatch

Other Resources

COleDispatchDriver Members