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

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
 Share

×
×
  • Create New...