X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/223d09f6b523aac674ef9b72a883dfa8d37c5d4e..58b1642453c5858a4dd29425b065e9215cb8ec79:/src/msw/dcclient.cpp 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