各位看看这个程序有什么错?如何一运行电脑重启

各位看看这个程序有什么错??怎么一运行电脑重启
各位看看这个程序有什么错?如何一运行电脑重启
#include<windows.h>
#include<TCHAR.h>

LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,PSTR lpCmdLine,int nCmdShow)
{
HWND hwnd;
MSG msg;
static TCHAR szName[]=_T("hello");
WNDCLASS wndclass;
wndclass.cbClsExtra=0;
wndclass.cbWndExtra=0;
wndclass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.hCursor=LoadCursor(NULL,IDI_APPLICATION);
wndclass.hIcon=LoadIcon(NULL,IDC_ARROW);
wndclass.hInstance=hInstance;
wndclass.lpfnWndProc=WndProc;
wndclass.lpszClassName=szName;
wndclass.lpszMenuName=NULL;
wndclass.style=CS_HREDRAW|CS_VREDRAW;
if(!RegisterClass(&wndclass))
{
MessageBox(NULL,_T("SSSS"),_T("Excaption"),MB_OKCANCEL);
return 0;
}
hwnd=CreateWindow(szName,_T("beeper1,timer denmo"),
  WS_OVERLAPPEDWINDOW,
  CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
  NULL,NULL,hInstance,NULL);
ShowWindow(hwnd,nCmdShow);
UpdateWindow(hwnd);
while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}



LRESULT CALLBACK WndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
     HDC hdc;
    int s=0,f=0,m=1;
LPTSTR suff=new TCHAR[1024];
int cx,cy;
    switch(message)
    {
    case  WM_CREATE:
SetTimer(hwnd,1,1000,NULL);
return 0;
case WM_SIZE:
cx=LOWORD(lParam);
cy=HIWORD(lParam);
return 0;
case WM_TIMER:
hdc=GetDC(hwnd);
if(m=60)
{
m=0;f++;}
if(f=60)
{
f=0;s++;}
m++;
wsprintf(suff,L"%d:%d:%d",s,f,m);

TextOut(hdc,0,0,suff,sizeof(suff));
ReleaseDC(hwnd,hdc);
return 0;

case WM_DESTROY:
PostQuitMessage(0);
return 0;
}

return DefWindowProc(hwnd,message,wParam,lParam);

}
------解决思路----------------------
原因很简单。
LPTSTR suff=new TCHAR[1024];
在不断申请内存,但是你没有释放,导致内存耗尽,改起来也很简单,可以在WM_TIMER开始的时候
用TCHAR * suff=new TCHAR[1024];
在WM_TIMER消息return前使用delete suff[];