Fred, is the cleanup code of PureBasic optimized?
By that I mean, does it actually call memory freeing functions or just leave them?
I know that MicroSoft actually advices to not free memory at process end as that could cause the system to start pulling pages into memory from disk rather than just mark them as free.
There are a few things that must be freeded though (but MSDN should point that out in those cases), but a lot of things can surprisingly enough be just left alone, like memory allocation.
During a program run FreeMemory() should obviously free the memory.
But at program end FreeMemory() could just be a NOP actually and system performance would improve actually, OS restart/shutdown would also be sped up.
I read a article on this, but I can't find the damn thing again now obviously, sorry...
Ooh hang on here they are (phew):http://blogs.msdn.com/b/oldnewthing/arc ... 53268.aspxhttp://blogs.msdn.com/b/oldnewthing/arc ... 83346.aspx
Does PureBasic take advantage of this Windows behavior to speed up process end/exit?