懂CRITICAL_SECTION或剔除空间的大神请进,求帮助

懂CRITICAL_SECTION或删除空间的大神请进,求帮助
书本上一个程序里有这样的三句
CRITICAL_SECTION g_cs;
::InitializeCriticalSection(&g_cs);
::DeleteCriticalSection(&g_cs);

我想问一下就是
DeleteCriticalSection(&g_cs),这样能删除吗?因为g_cs不是动态开辟的空间,所以挺疑惑的。




// 03CountErr.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include<windows.h>
#include<process.h>

int g_nCount1=0;
int g_nCount2=0;
BOOL g_bContinue=TRUE;
UINT __stdcall ThreadFunc(LPVOID);

CRITICAL_SECTION g_cs;//new

int main(int argc, char* argv[])
{
UINT uId;
HANDLE h[2];

::InitializeCriticalSection(&g_cs);//new

h[0]=(HANDLE)(::_beginthreadex(NULL,0,ThreadFunc,NULL,0,&uId));
h[1]=(HANDLE)(::_beginthreadex(NULL,0,ThreadFunc,NULL,0,&uId));

Sleep(1000);
g_bContinue=FALSE;
::WaitForMultipleObjects(2,h,TRUE,INFINITE);
::CloseHandle(h[0]);
::CloseHandle(h[1]);

::DeleteCriticalSection(&g_cs);//new

printf("g_nCount1=%d\n",g_nCount1);
printf("g_nCount2=%d\n",g_nCount2);

return 0;
}

UINT __stdcall ThreadFunc(LPVOID)
{
while(g_bContinue)
{
::EnterCriticalSection(&g_cs);//new
g_nCount1++;
g_nCount2++;
::LeaveCriticalSection(&g_cs);//new
}
return 0;
}


CRITICAL_SECTION 删除空间 C C++ Windows

------解决方案--------------------
把它们想象成CriticalSection的构造和析构函数(原则上说其实本来就是),而不是new和delete。