diff --git a/ANSI.c b/ANSI.c index f2fd53f..5c7a0c6 100644 --- a/ANSI.c +++ b/ANSI.c @@ -196,6 +196,9 @@ v1.83, 16 February, 2018: create the flush thread on first use. + + v1.84-wip, 17 February, 2018: + close the flush handles on detach. */ #include "ansicon.h" @@ -3905,7 +3908,14 @@ BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved ) } else if (dwReason == DLL_PROCESS_DETACH) { + CloseHandle( hFlushTimer ); FlushBuffer(); + DeleteCriticalSection( &CritSect ); + if (hFlush != NULL) + { + TerminateThread( hFlush, 0 ); + CloseHandle( hFlush ); + } if (lpReserved == NULL) { DEBUGSTR( 1, "Unloading" ); diff --git a/ansicon.c b/ansicon.c index 5b6a569..8511d9f 100644 --- a/ansicon.c +++ b/ansicon.c @@ -91,7 +91,7 @@ use -pu to unload from the parent. */ -#define PDATE L"16 February, 2018" +#define PDATE L"17 February, 2018" #include "ansicon.h" #include "version.h" diff --git a/readme.txt b/readme.txt index 5157a09..a2a5e04 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Copyright 2005-2018 Jason Hood - Version 1.83. Freeware + Version 1.84-wip. Freeware Description @@ -339,6 +339,9 @@ Version History Legend: + added, - bug-fixed, * changed. + 1.84-wip - 17 February, 2018: + - close the flush handles on detach. + 1.83 - 16 February, 2018: - create the flush thread on first use. @@ -613,4 +616,4 @@ Distribution ============================== -Jason Hood, 16 February, 2018. +Jason Hood, 17 February, 2018. diff --git a/version.h b/version.h index dc543a2..32ae50e 100644 --- a/version.h +++ b/version.h @@ -2,11 +2,11 @@ version.h - Version defines. */ -#define PVERS L"1.83" // wide string -#define PVERSA "1.83" // ANSI string (windres 2.16.91 didn't like L) -#define PVERE L"183" // wide environment string -#define PVEREA "183" // ANSI environment string -#define PVERB 1,8,3,0 // binary (resource) +#define PVERS L"1.84-wip" // wide string +#define PVERSA "1.84-wip" // ANSI string (windres 2.16.91 didn't like L) +#define PVERE L"184" // wide environment string +#define PVEREA "184" // ANSI environment string +#define PVERB 1,8,4,0 // binary (resource) #ifdef _WIN64 # define BITS L"64"