ENIGMA Forums

Sharing is caring => Tips, Tutorials, Examples => Topic started by: hpg678 on October 22, 2018, 06:40:35 am

Title: Debugging Your Project: Finding Memory Leaks
Post by: hpg678 on October 22, 2018, 06:40:35 am
i was having some memory leaks problems with a project of mine. One of the developers (gfundies) mentioned using "Test Harness' to find them. It not only solved my problem but also pointed out other errors/inconsistencies within my code. Which is why i thought it'd be a great tip on Debugging for you guys.
The Test Harness segment can be found in Game Settings-> Compiler.What i did is run my project, then copy/compare the results.

I have used this method on my Linux machine. I haven't tried it on Windows or Mac, but it should work fine.


*****Note*****
I'm not sure if this method is the most efficient way but , it works for me now at least. Who know, maybe the guys will construct something more efficient like an automated process writing to a file or something else........who knows........... :)



Title: Re: Debugging Your Project: Finding Memory Leaks
Post by: Goombert on October 30, 2018, 10:26:52 am
Thanks so much for sharing these pro tips with the community Hugar! I am going to set this topic sticky for now, later a section could be added to the Wiki about this.
https://enigma-dev.org/docs/Wiki/Debugging

I too would like to see a built-in memory leak detector, perhaps we can get to it someday with RGM. For now, using the test-harness is a perfectly acceptable approach to dealing with this.