mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:03:03 +01:00
Fixed CORE-1851. We cannot shutdown the engine properly in the "on DLL detach" handler.
This code exists since v1.5, but it was never activated due to a wrong conditional compilation. We've enabled it in v2.1 only and it has immediately showed its problems. Let's better allow a memory leak but don't crash/hang. v2.5 has already solved this issue completely, but the backport is nearly impossible.
This commit is contained in:
parent
031d467220
commit
9fc287f2fe
@ -23,25 +23,9 @@
|
|||||||
|
|
||||||
#include "firebird.h"
|
#include "firebird.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "../jrd/common.h"
|
|
||||||
#include "../../utilities/install/registry.h"
|
|
||||||
#include "../jrd/jrd_proto.h"
|
|
||||||
#include "../jrd/thread_proto.h"
|
|
||||||
|
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE h, DWORD reason, LPVOID reserved)
|
BOOL WINAPI DllMain(HINSTANCE /*h*/, DWORD /*reason*/, LPVOID /*reserved*/)
|
||||||
{
|
{
|
||||||
switch (reason) {
|
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
|
||||||
#ifdef EMBEDDED
|
|
||||||
JRD_shutdown_all(false);
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user