2
0
Эх сурвалжийг харах

* deallocate thread variables for the main thread as well, as described in #15002

git-svn-id: trunk@14201 -
florian 16 жил өмнө
parent
commit
c288e6c105

+ 2 - 1
rtl/win/syswin.inc

@@ -54,7 +54,7 @@ function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntry
        DLL_THREAD_ATTACH :
        DLL_THREAD_ATTACH :
          begin
          begin
            inclocked(Thread_count);
            inclocked(Thread_count);
-           
+
            WinEnterCriticalSection(AttachingThread);
            WinEnterCriticalSection(AttachingThread);
            if (Win32GetCurrentThreadId <> MainThreadIdWin32) then
            if (Win32GetCurrentThreadId <> MainThreadIdWin32) then
            begin
            begin
@@ -89,6 +89,7 @@ function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntry
            if assigned(Dll_Process_Detach_Hook) then
            if assigned(Dll_Process_Detach_Hook) then
              Dll_Process_Detach_Hook(DllParam);
              Dll_Process_Detach_Hook(DllParam);
 
 
+           DoneThread;
            { Free TLS resources used by ThreadVars }
            { Free TLS resources used by ThreadVars }
            SysFiniMultiThreading;
            SysFiniMultiThreading;
            WinDoneCriticalSection(AttachingThread);
            WinDoneCriticalSection(AttachingThread);