Do not delete mDecompThread as it can lead to subtle race conditions and crashes during process shutdown.
parent
576ef52c45
commit
a31b82eaca
|
|
@ -3463,8 +3463,12 @@ void LLMeshRepository::shutdown()
|
|||
|
||||
if (mDecompThread)
|
||||
{
|
||||
mDecompThread->shutdown();
|
||||
delete mDecompThread;
|
||||
mDecompThread->shutdown();
|
||||
|
||||
// <FS:ND> Deleting the thread at this point can lead to very subtle memory corruption due to the thread still possibly executing code that comes after shutdown does return.
|
||||
// Not nice, but leak it and let the OS clean up once process exit is complete.
|
||||
// delete mDecompThread;
|
||||
|
||||
mDecompThread = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue