#239 Missing Destructor causes Resource Leak Exiting Program!

v1.0 (example)
closed-wont-fix
None
5
2014-02-27
2010-09-03
No

Hello,
this leak has been around for years - although It is so easy to fix:
Please, add this destructor just before line 152 in atlframe.h - current version.
(Alternatively I could fix it for you. But then I needed a username/pwd for the repository.)
Thank you!

~CFrameWndClassInfo()
{
::UnregisterClass(m_wc.lpszClassName, m_wc.hInstance);
::DestroyIcon(m_wc.hIcon);
::DestroyIcon(m_wc.hIconSm);
}

Discussion

    • assigned_to: nobody --> nenadstefanovic
     
  • There is no need to do this. App is about to terminate and those resources will be cleaned up. Also, ATL (from version 7.1) unregisters all WNDCLASSes in AtlWinModuleTerm().

    Icons should be destroyed because they are shared icons loaded with LoadImage().

     
    • status: open --> closed-wont-fix
    • Group: --> v1.0 (example)