Older Newer
Sat, 05 Jul 2008 11:06:33 . . . . afh [change return value; add comment]

Changes by last author:

= deleteCriticalSection =

== Syntax ==

:bool deleteCriticalSection(int hCS)

== Arguments ==


::Specifies the handle of the Critical Section to be deleted, as obtained from a call to createCriticalSection.

== Return ==

:This function returns true immediately after deleting the specified Critical Section. It returns false if hCS is zero.

== Description ==

:This function deletes a specified Critical Section and releases all system resources that were allocated to it. Any thread can delete the Critical Section, but it must be currently unowned by any thread. After a Critical Section is deleted, it can no longer be used as a synchronization object until it is recreated by a call to createCriticalSection.



:For more information about Critical Sections, see the MSDN documentation about [Critical Section Objects].

== Example[[Anchor example]] ==

:See the createCriticalSection example.

== Also see ==

:System Functions, Critical Section Functions, createCriticalSection, enterCriticalSection, tryEnterCriticalSection, leaveCriticalSection

== Comments ==

Everyone can add his or her comments about his or her experiences with this function. Tips for using it are welcome, too.

* One need not normally test the return value of deleteCriticalSection. This is merely a check to make sure that hCS is non-zero so the DeleteCriticalSection Win32 API won't cause a memory access violation.