Cleaned up paint DC cache in ~wxPaintDC to avoid spurious memory warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -234,6 +234,11 @@ wxPaintDC::~wxPaintDC()
|
|||||||
::EndPaint(GetWinHwnd(m_canvas), &g_paintStruct);
|
::EndPaint(GetWinHwnd(m_canvas), &g_paintStruct);
|
||||||
|
|
||||||
ms_cache.Remove(index);
|
ms_cache.Remove(index);
|
||||||
|
|
||||||
|
// Reduce the number of bogus reports of non-freed memory
|
||||||
|
// at app exit
|
||||||
|
if (ms_cache.IsEmpty())
|
||||||
|
ms_cache.Clear();
|
||||||
}
|
}
|
||||||
//else: cached DC entry is still in use
|
//else: cached DC entry is still in use
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user