* Fixed a memory leak in wxThread
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,7 +28,7 @@ enum thread_state {
|
||||
// Static variables
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxMutex wxMainMutex; // controls access to all GUI functions
|
||||
wxMutex *wxMainMutex; // controls access to all GUI functions
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Windows implementation
|
||||
@@ -243,13 +243,15 @@ class wxThreadModule : public wxModule {
|
||||
public:
|
||||
virtual bool OnInit() {
|
||||
/* TODO p_mainid = GetCurrentThread(); */
|
||||
wxMainMutex.Lock();
|
||||
wxMainMutex = new wxMutex();
|
||||
wxMainMutex->Lock();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Global cleanup
|
||||
virtual void OnExit() {
|
||||
wxMainMutex.Unlock();
|
||||
wxMainMutex->Unlock();
|
||||
delete wxMainMutex;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user