[Marble-devel] branches/work/marble-geodata-nt/marble/src/lib/geodata/parser

Patrick Spendrin ps_ml at gmx.de
Sat Feb 14 03:32:41 CET 2009


SVN commit 925750 by sengels:

do not kill the bearer of evil tidings.
rather we should cleanup our mess
CCMAIL:marble-devel at kde.org

 M  +7 -0      GeoDocument.cpp  
 M  +4 -0      GeoDocument.h  


--- branches/work/marble-geodata-nt/marble/src/lib/geodata/parser/GeoDocument.cpp #925749:925750
@@ -19,6 +19,7 @@
     Boston, MA 02110-1301, USA.
 */
 
+#include <cstdio>
 #include "GeoDocument.h"
 
 namespace Marble
@@ -30,6 +31,12 @@
 
 GeoDocument::~GeoDocument()
 {
+#if DUMP_GEONODE_LEAKS > 0
+    if (s_leakProtector != 0) {
+        fprintf(stderr, "Found %li GeoNode object LEAKS!\n", s_leakProtector);
+        s_leakProtector = 0;
+    }
+#endif
 }
 
 bool GeoDocument::isGeoDataDocument() const
--- branches/work/marble-geodata-nt/marble/src/lib/geodata/parser/GeoDocument.h #925749:925750
@@ -40,6 +40,10 @@
 
     virtual bool isGeoDataDocument() const;
     virtual bool isGeoSceneDocument() const;
+#if DUMP_GEONODE_LEAKS > 0
+     // Initialize here, as there is no GeoDocument.cpp file     
+     unsigned long GeoDocument::s_leakProtector = 0;     
+#endif      
 };
 
 /**


More information about the Marble-devel mailing list