stkash
asked on
resource leak in CreateSolidBrush
What is wrong with this code?
CodeSnitch of Entrek (utility that allows profiling WinCE) emphasise the line with CreateSolidBrush as a resourse leak.
Assuming that in my test application there is no use of the m_Brush, this leak is really weird.
Can you explane it?
CPOEApp::CPOEApp(LPCTSTR lpszAppName): CWinApp(lpszAppName)
{
m_Brush.CreateSolidBrush(T OP_LABEL_C OLOR); //resource leak
}
CPOEApp::~CPOEApp()
{
m_Brush.DeleteObject();
}
Stas K
CodeSnitch of Entrek (utility that allows profiling WinCE) emphasise the line with CreateSolidBrush as a resourse leak.
Assuming that in my test application there is no use of the m_Brush, this leak is really weird.
Can you explane it?
CPOEApp::CPOEApp(LPCTSTR lpszAppName): CWinApp(lpszAppName)
{
m_Brush.CreateSolidBrush(T
}
CPOEApp::~CPOEApp()
{
m_Brush.DeleteObject();
}
Stas K
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
no, I get only the resource leak
All the best
Martyn