X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fae05df5a988883e9c6683ccded766dfb7b84b1b..eb4642a989aca1aa6c1291a73d43d1247961a234:/src/unix/threadpsx.cpp?ds=sidebyside diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index a6f79d8db1..130ea38598 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -101,6 +101,7 @@ public: wxMutex::wxMutex() { p_internal = new wxMutexInternal; + pthread_mutex_init( &(p_internal->p_mutex), (const pthread_mutexattr_t*) NULL ); m_locked = 0; } @@ -696,6 +697,8 @@ wxThread::ExitCode wxThread::Delete() // wait until the thread stops p_internal->Wait(); } + //GL: As we must auto-destroy, the destruction must happen here. + delete this; return NULL; } @@ -717,6 +720,8 @@ wxThreadError wxThread::Kill() return wxTHREAD_MISC_ERROR; } + //GL: As we must auto-destroy, the destruction must happen here (2). + delete this; return wxTHREAD_NO_ERROR; }