Jump to content

[FIXED] Cppcheck: Mem leaks


blublubb
 Share

Recommended Posts

Hi guys,

have been playing 0 A.D. for a while now, and I like it pretty much!!!

As R13 is a bit delayed did check out sources yesterday have a look at the current state of development.

New features are amazing. :)

Then today had a look at sources with Cppcheck (http://cppcheck.sourceforge.net/) and it found some mem leaks.

[source\renderer\WaterManager.cpp:543]: (error) Memory leak: groundDirection

[source\renderer\WaterManager.cpp:543]: (error) Memory leak: waveForceHQ

Cannot say if they're valid because I really don't know your code structure at all, but we've found some nasty bugs while doing code for this:

http://www.benchmark...rum/content.php

So if nobody yet has done test run with Cppcheck, I highly recomend doing.

Cheers and keep on awsome work

Blulbubb

Link to comment
Share on other sites

That's my code in the fancy water shader... Looking at it it appears like GroundDirection is obsolete code and should be removed alltogether. WaveforceHQ does appear to be incorrectly not deleted (probably should be done after its last use, or line 543 in WaterManager.cpp)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...