Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CComSafeDeleteCriticalSection Class

This class provides methods for obtaining and releasing ownership of a critical section object.

class CComSafeDeleteCriticalSection : public CComCriticalSection

Name

Description

CComSafeDeleteCriticalSection::Init

Creates and initializes a critical section object.

CComSafeDeleteCriticalSection::Lock

Obtains ownership of the critical section object.

CComSafeDeleteCriticalSection::Term

Releases system resources used by the critical section object.

m_bInitialized

Flags whether the internal CRITICAL_SECTION object has been initialized.

CComSafeDeleteCriticalSection derives from the class CComCriticalSection. However, CComSafeDeleteCriticalSection provides additional safety mechanisms over CComCriticalSection.

When an instance of CComSafeDeleteCriticalSection goes out of scope or is explicitly deleted from memory, the underlying critical section object will automatically be cleaned up if it is still valid. In addition, the CComSafeDeleteCriticalSection::Term method will exit gracefully if the underlying critical section object has not yet been allocated or has already been released from memory.

See CComCriticalSection for more information on critical section helper classes.

CComCriticalSection

CComSafeDeleteCriticalSection

Header: atlcore.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.