From 121e0bd478f0064d7874ce7158d71e27df16f373 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 12 Dec 2022 14:44:37 +0100 Subject: [PATCH] - call FullGc twice, because once does not seem to be sufficient anymore when the object system is shut down --- source/common/objects/dobjtype.cpp | 1 + source/common/platform/win32/i_main.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/common/objects/dobjtype.cpp b/source/common/objects/dobjtype.cpp index fde9ea0e3..0ac7bc8ad 100644 --- a/source/common/objects/dobjtype.cpp +++ b/source/common/objects/dobjtype.cpp @@ -252,6 +252,7 @@ void PClass::StaticShutdown () // Make a full garbage collection here so that all destroyed but uncollected higher level objects // that still exist are properly taken down before the low level data is deleted. GC::FullGC(); + GC::FullGC(); Namespaces.ReleaseSymbols(); diff --git a/source/common/platform/win32/i_main.cpp b/source/common/platform/win32/i_main.cpp index f153a1dac..8ef92e880 100644 --- a/source/common/platform/win32/i_main.cpp +++ b/source/common/platform/win32/i_main.cpp @@ -548,7 +548,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE nothing, LPWSTR cmdline, int _CrtSetDbgFlag (_CrtSetDbgFlag(0) | _CRTDBG_LEAK_CHECK_DF); // Use this to break at a specific allocation number. - //_crtBreakAlloc = 227524; + _crtBreakAlloc = 380659; #endif int ret = DoMain (hInstance);