I am creating and deleting MFC gdi objects and watching the number of GDI Objects that application uses via Windows Task Manager.
When i create a CBrush object by CreateSolidBrush i observe an increment in GDI Object count of application. However when i delete the brush by DeleteObject there happens no change.
I am using VS 2003, i create an MFC Dialog Application, add two buttons and two handlers for them. And a CBrush* member.
Here is the functions that handles button clicks:
// m_pBrush is a member CBrush*
m_pBrush = new CBrush;
Does anybody have an idea why GDI object count does not decrement when i delete the brush i have created?
Thanks in advance.