what happens when you close via the X button or Alt-X
Displaying 1-3 of 3 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
pthaloearth

Is any freeing of memory even attempted?

If no freeing is taking place, which I assume is the case. Perhaps binding a function to the X button and Alt-X closing, much like the autoExec, so that we could free our used memory automatically would be a good idea?

Thoughts?

Posted on 2008-12-13 17:17:43

Overkill

It's the operating system kernel's job to take care and free all unfreed dynamic memory when a program exits, so I don't really see what the point is here. We don't explicitly free everything at the end, but it makes no difference since Windows, Mac, and Linux are all smart enough to collect the dangling memory. Too many programs out there don't free resources at the end, that it HAS to be an OS feature to make sure resources are returned.

Memory leaks should pretty much only apply during the scope of a program's execution, and then it's entirely the programmer's fault. Not freeing on exit is quite acceptable though.

And essentially any time an error or exception can occur in a program, and it needs to exit, it's very unclear what resources are in memory from the program's perspective. So the responsibilities fall onto the operating system kernel, that can mend everything after a program exits because it knows everything that each and every process is holding onto, so it has full control over the situation.

So you don't need to worry here, really. :D

Posted on 2008-12-13 22:44:54 (last edited on 2008-12-14 01:29:24)

pthaloearth

ah, well I can now say I learned something today!

Posted on 2008-12-15 14:40:23


Displaying 1-3 of 3 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.