Sign in to follow this  
nuclear123

memory leak?

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this