[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/lib/geodata/parser
From:       Jens-Michael Hoffmann <jensmh () gmx ! de>
Date:       2009-01-16 12:39:57
Message-ID: 1232109597.670796.10848.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 911889 by jmhoffmann:

Remove the leak detector in GeoNode for the following reasons:
1. it is not the right way to do it, there are tools for this like
   valgrind and where do we want to draw the line? why only have
   it in GeoNode and not in other classes as well?
2. it has not been working for quite some time and nobody cares to fix it.


 M  +0 -30     GeoDocument.cpp  
 M  +0 -10     GeoDocument.h  


--- trunk/KDE/kdeedu/marble/src/lib/geodata/parser/GeoDocument.cpp #911888:911889
@@ -21,29 +21,15 @@
 
 #include "GeoDocument.h"
 
-#if DUMP_GEONODE_LEAKS > 0
-#include <cstdio>
-#endif
-
 namespace Marble
 {
 
-#if DUMP_GEONODE_LEAKS > 0
-unsigned long GeoDocument::s_leakProtector = 0;
-#endif
-
 GeoDocument::GeoDocument()
 {
 }
 
 GeoDocument::~GeoDocument()
 {
-#if DUMP_GEONODE_LEAKS > 0
-    if ( s_leakProtector != 0 ) {
-        std::fprintf( stderr, "Found %lu GeoNode object LEAKS!\n", s_leakProtector \
                );
-        s_leakProtector = 0;
-    }
-#endif
 }
 
 bool GeoDocument::isGeoDataDocument() const
@@ -59,26 +45,10 @@
 
 GeoNode::GeoNode()
 {
-#if DUMP_GEONODE_LEAKS > 0
-    GeoDocument::s_leakProtector++;
-
-#if DUMP_GEONODE_LEAKS > 1
-    fprintf( stderr, "Constructed new GeoNode object, leak protection count: %lu\n",
-             GeoDocument::s_leakProtector );
-#endif
-#endif
 }
 
 GeoNode::~GeoNode()
 {
-#if DUMP_GEONODE_LEAKS > 0
-    --GeoDocument::s_leakProtector;
-
-#if DUMP_GEONODE_LEAKS > 1
-    fprintf( stderr, "Destructed GeoNode object, leak protection count: %lu\n",
-             GeoDocument::s_leakProtector );
-#endif
-#endif
 }
 
 }
--- trunk/KDE/kdeedu/marble/src/lib/geodata/parser/GeoDocument.h #911888:911889
@@ -23,12 +23,6 @@
 #ifndef GeoDocument_h
 #define GeoDocument_h
 
-
-// Set to a value greater than 0, to enable leak tracking of GeoNode objects
-// Set to a value greater than 1, to enable detailed tracking of \
                construction/destruction of GeoNode objects
-#define DUMP_GEONODE_LEAKS 1
-
-
 #include "geodata_export.h"
 
 namespace Marble
@@ -42,10 +36,6 @@
     GeoDocument();
 
 public:
-#if DUMP_GEONODE_LEAKS > 0
-    static unsigned long s_leakProtector;
-#endif
-
     virtual ~GeoDocument();
 
     virtual bool isGeoDataDocument() const;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic