Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory Leaks

Status
Not open for further replies.

cybertuner

Programmer
Jul 30, 2003
1
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top