[calligra] krita/image/tiles3: Only bother asserting on memory leaks if we are investigating them

Boudewijn Rempt boud at valdyas.org
Thu Jun 28 18:46:16 UTC 2012


On Thursday 28 June 2012 Jun, Dmitry Kazakov wrote:
> You should better remove the assert at all, because 'ifndef' here was
> intentional. If you assert with the leak tracker activated, you'll just
> break the work of it. It will not be able to track the leaks.

Okay... but what was the purpose of the assert then?

> 
> On Thu, Jun 28, 2012 at 5:54 PM, Boudewijn Rempt <boud at valdyas.org> wrote:
> 
> > Git commit 9d49b8da213b8ddb73f770e0da6f50fa64c52e83 by Boudewijn Rempt.
> > Committed on 28/06/2012 at 15:51.
> > Pushed by rempt into branch 'master'.
> >
> > Only bother asserting on memory leaks if we are investigating them
> >
> > I.e., when HAVE_MEMORY_LEAK_TRACKER is true
> >
> > M  +1    -1    krita/image/tiles3/kis_tile_data_store.cc
> >
> > http://commits.kde.org/calligra/9d49b8da213b8ddb73f770e0da6f50fa64c52e83
> >
> > diff --git a/krita/image/tiles3/kis_tile_data_store.cc
> > b/krita/image/tiles3/kis_tile_data_store.cc
> > index a948689..56074be 100644
> > --- a/krita/image/tiles3/kis_tile_data_store.cc
> > +++ b/krita/image/tiles3/kis_tile_data_store.cc
> > @@ -87,7 +87,7 @@ KisTileDataStore::~KisTileDataStore()
> >         qCritical() << "CRITICAL: Tiles in memory:" << numTilesInMemory()
> >                     << "Total tiles:" << numTiles();
> >
> > -#ifndef HAVE_MEMORY_LEAK_TRACKER
> > +#ifdef HAVE_MEMORY_LEAK_TRACKER
> >         Q_ASSERT_X(0, "KisTileDataStore::~KisTileDataStore",
> >                    "Let's crash to be on the safe side! ;)");
> >  #endif /* HAVE_MEMORY_LEAK_TRACKER */
> >
> >
> 
> 
> 


-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl


More information about the kimageshop mailing list