I compile dll and exe with ShareMM option, but when I unload dll (FreeLibrary) from exe then FastMM hangs on FinalizeMemoryManager->DestroyCleanupThread called from DLL finalization.
procedure DestroyCleanupThread;
begin
if ReleaseStackCleanupThread <> 0 then
begin
SetEvent(ReleaseStackCleanupThreadTerminate);
WaitForSingleObject(ReleaseStackCleanupThread, INFINITE); <--- hangs on waiting
CloseHandle(ReleaseStackCleanupThread);
ReleaseStackCleanupThread := 0;
CloseHandle(ReleaseStackCleanupThreadTerminate);
ReleaseStackCleanupThreadTerminate := 0;
end;
end;
I compile dll and exe with ShareMM option, but when I unload dll (FreeLibrary) from exe then FastMM hangs on FinalizeMemoryManager->DestroyCleanupThread called from DLL finalization.