Ehehe i'll try explain this apparent contraddiction.Originally Posted by Malver
The first fact is that while you're application is running, no memory will be automatically freed. So if your application leaks memory on it's main loops, it will keep wasting memory all the time that it is running. A game can easily eats lots of mega each second. If it's run for hours it can finish all avaiable memory.
You could say that it's not a great problem but think that there are lots of program/processes running on a system, and they need their memory too.
So it's always wrong to not release memory.
All this reasoning applies on a program in execution. When a program terminates, the OS releases all memory allocated (and all other resources too). This to say that if you forget to release by yourself you will not waste memory indefinitely The user can always kill the program and get the memory back.
But this don't make it less important to always release everything while the program is running.
Bookmarks