I’d like to add one aspect. When a program starts, it basically has to make sure all the code it uses is in the right place in memory. That takes some time.
When the program is closed, however, it doesn’t always need to wipe all of that data – it can just tell the operating system (OS) “Hey, those big chunks of data that I used – I don’t need them any more, bye”. The data is still in the same place in memory for a while, but it’s ready to be overwritten by the next application that needs memory.
The process of just telling the OS that a chunk of data can now be considered free is much faster than to load the data there.
Latest Answers