From 2bc1aa1174ee3ddd68615827c3531549cf204918 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 5 Nov 1999 15:04:31 +0000 Subject: [PATCH] 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 --- src/msw/dcclient.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index ec20193357..c675ce039f 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -234,6 +234,11 @@ wxPaintDC::~wxPaintDC() ::EndPaint(GetWinHwnd(m_canvas), &g_paintStruct); 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 -- 2.45.2