Update main.d

* Make sure we return any used memory back to the OS on exit
This commit is contained in:
abraunegg 2024-04-25 09:46:20 +10:00
parent e3b2ec4ae1
commit f941db0349

View file

@ -1417,8 +1417,10 @@ void performSynchronisedExitProcess(string scopeCaller = null) {
// Finalise all logging and destroy log buffer
shutdownApplicationLogging();
// Memory Garbage Collection
// Perform Garbage Cleanup
GC.collect();
// Return free memory to the OS
GC.minimize();
}
}