* 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:
Guilhem Lavaux
1998-11-24 19:01:20 +00:00
parent 7be07660b4
commit 6773ae198f
14 changed files with 78 additions and 54 deletions

View File

@@ -138,7 +138,7 @@ bool wxThread::IsAlive() const
void wxThread::SetPriority(int WXUNUSED(prio)) { }
int wxThread::GetPriority() const { return 0; }
wxMutex wxMainMutex; // controls access to all GUI functions
wxMutex *wxMainMutex; // controls access to all GUI functions
wxThread::wxThread()
{
@@ -168,13 +168,15 @@ public:
};
bool wxThreadModule::OnInit() {
wxMainMutex.Lock();
wxMainMutex = new wxMutex();
wxMainMutex->Lock();
return TRUE;
}
void wxThreadModule::OnExit()
{
wxMainMutex.Unlock();
wxMainMutex->Unlock();
delete wxMainMutex;
}
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)