Skip to main content
gamedev.net
🔒 Locked

memory leaks

Started by icecubeflower Aug 25, 2008 at 11:52 PM 0 replies 850+ views
Original Post
icecubeflower
icecubeflower
What if you write a program with a lot of dynamic memory and then it crashes before the destructors can de-allocate all the memory? Does the OS know what's up and free it? Or is it gone forever until you reboot?
hh10k
hh10k
The OS will automatically free the memory for you. It will also close any open files and connections, but buffers won't properly be flushed. There are some operating systems that don't do this, but you're highly unlikely to ever encounter them.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.