+#if wxUSE_THREADS
+static wxMutex *gs_mutexIterator;
+
+class wxMglRegionModule : public wxModule
+{
+public:
+ virtual bool OnInit()
+ {
+ gs_mutexIterator = new wxMutex();
+ return true;
+ }
+ virtual void OnExit()
+ {
+ wxDELETE(gs_mutexIterator);
+ }
+
+ DECLARE_DYNAMIC_CLASS(wxMglRegionModule)
+};
+IMPLEMENT_DYNAMIC_CLASS(wxMglRegionModule, wxModule)
+#endif
+