* 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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user