edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
edbee::DebugAllocationList Class Reference

This class is used to remember all memory leakds. More...

#include <debug_allocs.h>

+ Collaboration diagram for edbee::DebugAllocationList:

Public Member Functions

 DebugAllocationList ()
 cnostructs the allocation list
 
virtual ~DebugAllocationList ()
 The allocation list destructor.
 
void clear ()
 clears the debugging allocation list
 
size_t size ()
 
bool isRunning ()
 
void pause (bool val)
 
EdbeeRecursiveMutexmutex ()
 Returns the mutex for thread-safety.
 
void start (bool checkDelete)
 Starts the monitoring of allocations.
 
int stop ()
 Stops the monitoring of allocations.
 
DebugAllocationfind (void *p)
 Finds the given pointer int the allocation list.
 
DebugAllocationadd (void *p, size_t size, char *file, int line)
 Adds the given pointer to the allocation list.
 
bool del (void *p)
 removes the given pointer from the allocation list
 
bool checkDelete ()
 returns the state of checkdelete
 

Static Public Member Functions

static DebugAllocationListinstance ()
 returns the allocation list instance
 

Friends

void * debug_malloc (size_t size, const char *file, const int line)
 
void debug_free (void *p, const char *file, const int line)
 

Detailed Description

This class is used to remember all memory leakds.

Constructor & Destructor Documentation

◆ DebugAllocationList()

edbee::DebugAllocationList::DebugAllocationList ( )

cnostructs the allocation list

◆ ~DebugAllocationList()

edbee::DebugAllocationList::~DebugAllocationList ( )
virtual

The allocation list destructor.

Member Function Documentation

◆ add()

DebugAllocation * edbee::DebugAllocationList::add ( void * p,
size_t size,
char * file,
int line )

Adds the given pointer to the allocation list.

Parameters
ppointer
sizethe size of the pointer
filethe source file of the allocation
linethe line number of the allocation

◆ checkDelete()

bool edbee::DebugAllocationList::checkDelete ( )

returns the state of checkdelete

◆ clear()

void edbee::DebugAllocationList::clear ( )

clears the debugging allocation list

◆ del()

bool edbee::DebugAllocationList::del ( void * p)

removes the given pointer from the allocation list

Parameters
pthe pointer

◆ find()

DebugAllocation * edbee::DebugAllocationList::find ( void * p)

Finds the given pointer int the allocation list.

Parameters
pthe pointer to search
Returns
the allocation object

◆ instance()

DebugAllocationList * edbee::DebugAllocationList::instance ( )
static

returns the allocation list instance

◆ isRunning()

bool edbee::DebugAllocationList::isRunning ( )
inline

◆ mutex()

EdbeeRecursiveMutex * edbee::DebugAllocationList::mutex ( )

Returns the mutex for thread-safety.

◆ pause()

void edbee::DebugAllocationList::pause ( bool val)
inline

◆ size()

size_t edbee::DebugAllocationList::size ( )
inline

◆ start()

void edbee::DebugAllocationList::start ( bool checkDelete)

Starts the monitoring of allocations.

Parameters
checkDeleteshould the delete operation be checked?

◆ stop()

int edbee::DebugAllocationList::stop ( )

Stops the monitoring of allocations.

Friends And Related Symbol Documentation

◆ debug_free

void debug_free ( void * p,
const char * file,
const int line )
friend

◆ debug_malloc

void * debug_malloc ( size_t size,
const char * file,
const int line )
friend

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