Menu

#1 Memory leak?

open
nobody
None
5
2001-06-20
2001-06-20
John Roark
No

when dragging an app using SkinSys it seems to leak
memory?

I think the problem is in OnPaint() in
SkinDialog.cpp...

------ start code --------
void CSkinDialog::OnPaint()
{
CPaintDC dc(this); // device context for
painting

// TODO: Add your message handler code here
RECT r;
GetClientRect\(&r\);
DrawBitmap\(GetDC\(\), \(HBITMAP\) m\_Normal, r,

TRUE);

for\(int i = 0; i < m\_Buttons.GetSize\(\); i++\)
\{
    CSkinButton\* m\_Btn = m\_Buttons.GetAt

(i);
m_Btn->Invalidate();
}

for\(i = 0; i < m\_Sliders.GetSize\(\); i++\)
\{
    CSkinSlider\* m\_Slider = m\_Sliders.GetAt

(i);
m_Slider->Invalidate();
}

for\(i = 0; i < m\_Labels.GetSize\(\); i++\)
\{
    CSkinLabel\* m\_Label = m\_Labels.GetAt

(i);
m_Label->Invalidate();
}

// added by John Roark jroark@cs.usfca.edu
// ::DeletDC(dc);
dc.DeleteDC();

}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB