2025-07-18 06:06 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001474Spring engineGeneralpublic2011-02-04 12:58
Reporterimbaczek 
Assigned Toabma 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionduplicate 
Product Version0.79.1.0+git 
Target VersionFixed in Version 
Summary0001474: memory leaks
Descriptionsee attached log
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
duplicate of 0001953resolvedabma valgrind log 
+Relationships

-Notes

~0003745

hoijui (reporter)

i have checked some, namely:
rts/Sim/Units/Groups/GroupHandler.cpp:44
rts/Sim/Features/Feature.cpp:647
and these are just lines with "new Something()", that are not explicitly assigned to a variable:
1. new Something(); // leak
2. mySomethings.push_back(new Something()); // leak
3. Something* s = new Something(); // non-leak

spring has a lot of the first, for example explosions, that delete themselfs when finnished. I agree it is not nice, but 99+% of occurences of this in spring code is not a memory leak.
I do not know how many of the second we have, but it is not even ugly, and no way implies a memory leak.

.. in other words, this list is quite useless in my eyes, as i dont think anyone will wnat to check 100 files ot possibly find one memory leak. :/

~0003748

imbaczek (reporter)

stuff that deletes itself when it's finished is one thing, making sure that stuff actually calls the finalization code is another. i went through a similar list a year or so ago and it was accurate.

the fact that there's a delete in code doesn't mean it is called. same thing with std::string/vector leaks: it simply means that they are members of an object that didn't delete itself properly.

~0003753

hoijui (reporter)

umm.. you are right :D
(i mean of course you know, just wanted to say i got it too now ;-) )
Groups in group handlers destructor are deleted, but group handlers are not deleted eg :D
i may fix some others of these, as i am bored right now :D
+Notes

-Issue History
Date Modified Username Field Change
2009-06-27 13:39 imbaczek New Issue
2009-06-27 13:39 imbaczek File Added: memleaks.zip
2009-07-24 15:06 hoijui Note Added: 0003745
2009-07-24 15:24 imbaczek Note Added: 0003748
2009-07-24 18:00 hoijui Note Added: 0003753
2010-07-12 10:48 hoijui Relationship added related to 0001953
2011-02-04 12:57 abma Relationship replaced duplicate of 0001953
2011-02-04 12:58 abma Duplicate ID 0 => 1953
2011-02-04 12:58 abma Status new => resolved
2011-02-04 12:58 abma Resolution open => duplicate
2011-02-04 12:58 abma Assigned To => abma
+Issue History