[Marble-devel] Memleak in GeoPolygon.cpp and geodata-ng

Torsten Rahn rahn at kde.org
Sat Mar 28 23:22:24 CET 2009


Hi,

Hdevalence just pointed me to 

http://www.davidfaure.fr/tmp/plasma_massif_with_marble.txt

which indicates a big GeoCoordinates memory leak in GeoPolygon. While the 
memory leak isn't relevant for the application case (as the leak happens on 
termination of the app) it's relevant for use as a MarbleMap in some cases.

Looking at it it seems that this is due to assumed transferred ownership of 
the GeoDataCoordinates in GeoPolygon line 49:

GeoPolygon::~GeoPolygon()
{
//    qDeleteAll( begin(), end() );
    qDeleteAll( m_boundary );
}

VectorComposer doesn't delete these items either. 

Does this get fixed with the geodata-ng branch, and is it safe to delete these 
items in ~VectorComposer in stable?

Regards,

Torsten








More information about the Marble-devel mailing list