Clean up event hash tables in a timely fashion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2118,6 +2118,12 @@ public:
|
||||
// and call self->ProcessEvent() if a match was found.
|
||||
bool HandleEvent(wxEvent &event, wxEvtHandler *self);
|
||||
|
||||
// Clear table
|
||||
void Clear();
|
||||
|
||||
// Clear all tables
|
||||
static void ClearAll();
|
||||
|
||||
protected:
|
||||
// Init the hash table with the entries of the static event table.
|
||||
void InitHashTable();
|
||||
@@ -2136,6 +2142,10 @@ protected:
|
||||
size_t m_size;
|
||||
EventTypeTablePointer *m_eventTypeTable;
|
||||
|
||||
static wxEventHashTable* sm_first;
|
||||
wxEventHashTable* m_previous;
|
||||
wxEventHashTable* m_next;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxEventHashTable)
|
||||
};
|
||||
|
||||
@@ -2166,7 +2176,6 @@ public:
|
||||
// process all pending events
|
||||
void ProcessPendingEvents();
|
||||
|
||||
// add a
|
||||
#if wxUSE_THREADS
|
||||
bool ProcessThreadEvent(wxEvent& event);
|
||||
#endif
|
||||
@@ -2223,6 +2232,9 @@ public:
|
||||
void ClearEventLocker();
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
// Avoid problems at exit by cleaning up static hash table gracefully
|
||||
void ClearEventHashTable() { GetEventHashTable().Clear(); }
|
||||
|
||||
private:
|
||||
static const wxEventTableEntry sm_eventTableEntries[];
|
||||
|
||||
|
Reference in New Issue
Block a user