davidm
2006-03-15 13:04:52 UTC
Hi,
I'm battling to find the cause of a memory leak in one of my evc++
dlls.
The dll creates a window, and draws to it in response to a WM_PAINT
message (as usual).
The trouble is that I've removed all the code from the OnPaint method
except the following:
void CMapWnd::OnPaint()
{
CPaintDC dc(this); // device context for painting
}
which still causes the leak.
Removing the CPaintDC line removes the leak.
Any thoughts on what could be going wrong here? I'm at my wits end.
Thanks,
Dave.
I'm battling to find the cause of a memory leak in one of my evc++
dlls.
The dll creates a window, and draws to it in response to a WM_PAINT
message (as usual).
The trouble is that I've removed all the code from the OnPaint method
except the following:
void CMapWnd::OnPaint()
{
CPaintDC dc(this); // device context for painting
}
which still causes the leak.
Removing the CPaintDC line removes the leak.
Any thoughts on what could be going wrong here? I'm at my wits end.
Thanks,
Dave.