Krita Source Code Documentation
Loading...
Searching...
No Matches
KisMemoryLeakTracker Class Reference

#include <kis_memory_leak_tracker.h>

Public Member Functions

template<typename _T_ >
void dereference (const _T_ *what, const void *bywho)
 
void dereference (const void *what, const void *bywho)
 
void dumpReferences ()
 
void dumpReferences (const void *what)
 
 KisMemoryLeakTracker ()
 
template<typename _T_ >
void reference (const _T_ *what, const void *bywho)
 
void reference (const void *what, const void *bywho, const char *whatName=0)
 
 ~KisMemoryLeakTracker ()
 

Static Public Member Functions

static KisMemoryLeakTrackerinstance ()
 

Private Attributes

Private *const d
 

Detailed Description

This class tracks what pointer is reference by who. It is used by the smart pointers to detect leaks.

Note that the KisMemoryLeakTracker is currently only available on Linux, and translate to NOOP on other platforms. It is also just a debug tool, and should not be used in a production build of krita.

Definition at line 34 of file kis_memory_leak_tracker.h.

Constructor & Destructor Documentation

◆ KisMemoryLeakTracker()

KisMemoryLeakTracker::KisMemoryLeakTracker ( )

Definition at line 193 of file kis_memory_leak_tracker.cpp.

193 : d(0)
194{
195}

◆ ~KisMemoryLeakTracker()

KisMemoryLeakTracker::~KisMemoryLeakTracker ( )

Definition at line 197 of file kis_memory_leak_tracker.cpp.

198{
199}

Member Function Documentation

◆ dereference() [1/2]

template<typename _T_ >
void KisMemoryLeakTracker::dereference ( const _T_ * what,
const void * bywho )

Definition at line 63 of file kis_memory_leak_tracker.h.

64{
65 dereference((void*)what, bywho);
66}
void dereference(const void *what, const void *bywho)

References dereference().

◆ dereference() [2/2]

void KisMemoryLeakTracker::dereference ( const void * what,
const void * bywho )

Definition at line 208 of file kis_memory_leak_tracker.cpp.

209{
210 Q_UNUSED(what);
211 Q_UNUSED(bywho);
212}

◆ dumpReferences() [1/2]

void KisMemoryLeakTracker::dumpReferences ( )

Definition at line 214 of file kis_memory_leak_tracker.cpp.

215{
216}

◆ dumpReferences() [2/2]

void KisMemoryLeakTracker::dumpReferences ( const void * what)

Definition at line 218 of file kis_memory_leak_tracker.cpp.

219{
220 Q_UNUSED(what);
221}

◆ instance()

KisMemoryLeakTracker * KisMemoryLeakTracker::instance ( )
static

Definition at line 22 of file kis_memory_leak_tracker.cpp.

23{
24 return s_instance;
25}

◆ reference() [1/2]

template<typename _T_ >
void KisMemoryLeakTracker::reference ( const _T_ * what,
const void * bywho )

Definition at line 57 of file kis_memory_leak_tracker.h.

58{
59 reference((void*)what, bywho, typeid(what).name());
60}
void reference(const void *what, const void *bywho, const char *whatName=0)
const char * name(StandardAction id)

References reference().

◆ reference() [2/2]

void KisMemoryLeakTracker::reference ( const void * what,
const void * bywho,
const char * whatName = 0 )

Definition at line 201 of file kis_memory_leak_tracker.cpp.

202{
203 Q_UNUSED(what);
204 Q_UNUSED(bywho);
205 Q_UNUSED(whatName);
206}

Member Data Documentation

◆ d

Private* const KisMemoryLeakTracker::d
private

Definition at line 51 of file kis_memory_leak_tracker.h.


The documentation for this class was generated from the following files: