Jump to content
  • Advertisement
Sign in to follow this  
nuclear123

memory leak?

This topic is 2504 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
To clarify further:

It depends. There may be OS resources which are NOT automatically reclaimed. Local OS resource will usually be cleaned up.

Any local resources (newed, malloced, etc.) are cleaned up.


However, it is not good practise to rely on that.

Share this post


Link to post
Share on other sites
For any resources that aren't picked up by the garbage collector (C#, for example, has an automatic garbage collector) there are manual ways to delete it from the memory. Not sure if this is different between gpu and cpu though.

Share this post


Link to post
Share on other sites
One problem related to memory leaks are other resource leaks. There are lots of things that the OS cannot do for you. For example, if you have unflushed data in an application buffer, the OS doesn't know about that. The file handle will be closed, but this data will be lost.

Worse than lost data, it can cause your file loading to fail, which means that not only is this additional data lost, the rest of the successfully written data is effectively corrupt.

This aside, if your program intends to run for a long time, you should ensure you have no memory leaks. They will slow down your program, and could eventually crash it. You should assume your program will be running a long time - the user might need or want leave it running for some reason and they would be very annoyed if it were to crash or become unusable if this happens.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!