cybertuner
Programmer
I make some API calls in C but when I use Rational PurifyPlus to detect memory leaks, it show that everyline of this code causes a leak of 68 bytes. Is it caused by WinAPI function or from my code?
//memset( &ti, 0, sizeof( TOOLINFO ) );
ti.cbSize = sizeof( TOOLINFO );
ti.hwnd = hWnd;
ti.hinst = hInstance;
ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND | TF_CENTERTIP;
ti.uId = (UINT)(HWND)GetDlgItem(hWnd,IDC_COLLECT);
ti.lpszText = LPSTR_TEXTCALLBACK;
SendMessage( h_ToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti );
I tried function memset() but it came out the same result. I also have some memory leaks in WinAPI functions that register window class.[Note: this C program creates some Windows dialog]. I very appreciate if anyone can let me know the source of this problem
//memset( &ti, 0, sizeof( TOOLINFO ) );
ti.cbSize = sizeof( TOOLINFO );
ti.hwnd = hWnd;
ti.hinst = hInstance;
ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND | TF_CENTERTIP;
ti.uId = (UINT)(HWND)GetDlgItem(hWnd,IDC_COLLECT);
ti.lpszText = LPSTR_TEXTCALLBACK;
SendMessage( h_ToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti );
I tried function memset() but it came out the same result. I also have some memory leaks in WinAPI functions that register window class.[Note: this C program creates some Windows dialog]. I very appreciate if anyone can let me know the source of this problem