From 63863e09de390aba56a52198731200eab1080bbc Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 19 Apr 1999 10:14:51 +0000 Subject: [PATCH] Fixed wxexpr.cpp bug (quote wasn't being removed in new MB code); fixed one of the remaining memory leaks (wxMSW, wxDefaultValidator) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 18 +++++++++++------- src/common/wxexpr.cpp | 4 ++-- src/msw/app.cpp | 2 ++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index cb0c18d5a7..6a1fd599d9 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1194,6 +1194,10 @@ public: bool SearchDynamicEventTable( wxEvent& event ); +#if wxUSE_THREADS + void ClearEventLocker() { delete m_eventsLocker; m_eventsLocker = NULL; }; +#endif + private: static const wxEventTableEntry sm_eventTableEntries[]; @@ -1203,18 +1207,18 @@ protected: virtual const wxEventTable *GetEventTable() const; protected: - wxEvtHandler* m_nextHandler; - wxEvtHandler* m_previousHandler; - bool m_enabled; // Is event handler enabled? - wxList* m_dynamicEvents; - wxList* m_pendingEvents; + wxEvtHandler* m_nextHandler; + wxEvtHandler* m_previousHandler; + bool m_enabled; // Is event handler enabled? + wxList* m_dynamicEvents; + wxList* m_pendingEvents; #if wxUSE_THREADS - wxCriticalSection* m_eventsLocker; + wxCriticalSection* m_eventsLocker; #endif // optimization: instead of using costly IsKindOf() to decide whether we're // a window (which is true in 99% of cases), use this flag - bool m_isWindow; + bool m_isWindow; }; typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&); diff --git a/src/common/wxexpr.cpp b/src/common/wxexpr.cpp index 1d82a95ba1..227efb2850 100644 --- a/src/common/wxexpr.cpp +++ b/src/common/wxexpr.cpp @@ -1197,13 +1197,13 @@ char *wxmake_string(char *str) int len, i; const wxMB2WXbuf sbuf = wxConv_libc.cMB2WX(str); - str++; /* skip leading quote */ +// str++; /* skip leading quote */ len = wxStrlen(sbuf) - 1; /* ignore trailing quote */ s = new wxChar[len + 1]; t = s; - for(i=0; i