Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

daBomb

Memory Leaks

This topic is 6657 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

I have a program in which I know there is a memory leak. Despite all of my hard work in which to ensure that I allocated correctly and deallocated correctly I still have a leak. That is why I come to all of you, what are some methods that you use to either find leaks or ensure against them. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Take a look on www.flipcode.com, there have been several articles posted on how to prevent memory leaks and how to use memory managers to your advantage.

Nate Miller
http://nate.scuzzy.net

Share this post


Link to post
Share on other sites
Find in files new to see every place you are allocating memory.
Fine in files delete to see every place you are freeing it. And it should be a one to one relation. If something is getting new''ed without getting deleted, there is your memory leak.

BTW, how do you KNOW you have a memory leak?

Later,
Eck

Share this post


Link to post
Share on other sites
Are you screwing around with lots of dynamic arrays? If nothing else, there''s a chance that your heap could be getting fragmented, which could possibly lead to slight increases in memory usage while your program is running.


random-nomad

[still searching]

Share this post


Link to post
Share on other sites

  • 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!