From 3a51f434c6a79bbf7dca8b0fd96a5df7671b5792 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 25 Mar 2014 16:43:57 +0100 Subject: wx: Add wxLocale class --- lib/wx/c_src/wxe_impl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/wx/c_src/wxe_impl.cpp') diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp index eeccca1de7..e3dc4862f2 100644 --- a/lib/wx/c_src/wxe_impl.cpp +++ b/lib/wx/c_src/wxe_impl.cpp @@ -505,15 +505,16 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd) ((wxBufferedDC *)ptr)->m_dc = NULL; // Workaround } wxString msg; + bool cleanup_ref=true; if(refd->type == 0) { // Maybe also class 1 wxClassInfo *cinfo = ((wxObject *)ptr)->GetClassInfo(); msg.Printf(wxT("Memory leak: {wx_ref, %d, %s}"), refd->ref, cinfo->GetClassName()); send_msg("error", &msg); } else { - delete_object(ptr, refd); + cleanup_ref = delete_object(ptr, refd); } - if(type == 0 || type > 2) { + if(cleanup_ref) { // Delete refs for leaks and non overridden allocs delete refd; ptr2ref.erase(it); -- cgit v1.2.3