From aece1f81b6334e0ea55453d23147f127932735b9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 Feb 2016 23:44:14 +0100 Subject: [PATCH] Remove tracing from wxWindowID code wxWindowID objects can be global and thus be destroyed after the library has been uninitialized and, worse, when some of the global objects have been already destroyed. In particular, using wxLogTrace() in DecIdRefCount() called from the dtor could result in using the possibly already destroyed wxConvLibc object, so avoid this by not doing any tracing from there. --- src/common/windowid.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/common/windowid.cpp b/src/common/windowid.cpp index d0ee64ff54..025132acd6 100644 --- a/src/common/windowid.cpp +++ b/src/common/windowid.cpp @@ -26,8 +26,6 @@ // Not needed, included in defs.h // #include "wx/windowid.h" -#define wxTRACE_WINDOWID wxT("windowid") - namespace { @@ -130,9 +128,6 @@ void IncIdRefCount(wxWindowID winid) { gs_autoIdsRefCount[winid]++; } - - wxLogTrace(wxTRACE_WINDOWID, wxT("Increasing ref count of ID %d to %d"), - winid + wxID_AUTO_LOWEST, GetIdRefCount(winid + wxID_AUTO_LOWEST)); } // Decrease the count for an id @@ -167,9 +162,6 @@ void DecIdRefCount(wxWindowID winid) } else gs_autoIdsRefCount[winid]--; - - wxLogTrace(wxTRACE_WINDOWID, wxT("Decreasing ref count of ID %d to %d"), - winid + wxID_AUTO_LOWEST, GetIdRefCount(winid + wxID_AUTO_LOWEST)); } #else // wxUSE_AUTOID_MANAGEMENT