3 ms·
>if they are only reclaimed by the OS when the program exits, then it is a leak. If this is true, then memory leaks have become a paradigm. I've seen it argued
by krapp 10y ago
>if they are only reclaimed by the OS when the program exits, then it is a leak.
If this is true, then memory leaks have become a paradigm. I've seen it argued that you should never bother freeing memory yourself, and just let the OS take care of it. It always bothered me.
- daemin 10y agoI think the statement refers to when already shutting down the program. In that case you don't need to worry about freeing OS managed resources as the OS will do that for you when your program exits. Which kind of makes sense but it isn't easy to do without some global flag that you can check and a non-normal destruction path for your objects/data.