+ delete obj;
+
+ if (wxPendingDelete.Member(obj))
+ delete node;
+
+ // Deleting one object may have deleted other pending
+ // objects, so start from beginning of list again.
+ node = wxPendingDelete.First();
+ }
+}
+
+#if wxUSE_THREADS
+void wxApp::ProcessPendingEvents()
+{
+ wxNode *node = wxPendingEvents->First();
+ wxCriticalSectionLocker locker(*wxPendingEventsLocker);
+
+ while (node)
+ {
+ wxEvtHandler *handler = (wxEvtHandler *)node->Data();
+
+ handler->ProcessPendingEvents();