4 ms·
If you're using malloc/free, you're in a world with no gc. You are responsible for memory management. If you're talking about runtimes, and lower level work -
by jki275 6y ago
If you're using malloc/free, you're in a world with no gc. You are responsible for memory management.
If you're talking about runtimes, and lower level work -- in the malloc/free world of C/C++ there isn't anything. If you allocate memory, that memory is allocated until you free it or your code exits. The OS isn't going to free your memory while your process is running, at least not that I'm aware of. You have to do it manually.
Then again, in some code it simply doesn't matter.
https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125 https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...