This class is used to remember all memory leakds.
More...
#include <debug_allocs.h>
This class is used to remember all memory leakds.
◆ DebugAllocationList()
edbee::DebugAllocationList::DebugAllocationList |
( |
| ) |
|
cnostructs the allocation list
◆ ~DebugAllocationList()
edbee::DebugAllocationList::~DebugAllocationList |
( |
| ) |
|
|
virtual |
The allocation list destructor.
◆ add()
DebugAllocation * edbee::DebugAllocationList::add |
( |
void * |
p, |
|
|
size_t |
size, |
|
|
char * |
file, |
|
|
int |
line |
|
) |
| |
Adds the given pointer to the allocation list.
- Parameters
-
p | pointer |
size | the size of the pointer |
file | the source file of the allocation |
line | the 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
-
◆ find()
Finds the given pointer int the allocation list.
- Parameters
-
- Returns
- the allocation object
◆ instance()
returns the allocation list instance
◆ isRunning()
bool edbee::DebugAllocationList::isRunning |
( |
| ) |
|
|
inline |
◆ mutex()
QMutex * edbee::DebugAllocationList::mutex |
( |
| ) |
|
Retuns the mutex for thread-safety.
◆ pause()
void edbee::DebugAllocationList::pause |
( |
bool |
val | ) |
|
|
inline |
◆ size()
int edbee::DebugAllocationList::size |
( |
| ) |
|
|
inline |
◆ start()
void edbee::DebugAllocationList::start |
( |
bool |
checkDelete | ) |
|
Starts the monitoring of allocations.
- Parameters
-
checkDelete | should the delete operation be checked? |
◆ stop()
int edbee::DebugAllocationList::stop |
( |
| ) |
|
Stops the monitoring of allocations.
◆ debug_free
void debug_free |
( |
void * |
p, |
|
|
const char * |
file, |
|
|
const int |
line |
|
) |
| |
|
friend |
frees the given pointer
- Parameters
-
p | the pointer to free |
file | the file which call originated from |
line | the linenumber of the delete |
- Todo:
- : This doesn't work very good. It sees to many free that are NOT allocated by us
◆ debug_malloc
void* debug_malloc |
( |
size_t |
size, |
|
|
const char * |
file, |
|
|
const int |
line |
|
) |
| |
|
friend |
Logs a malloc operation.
- Parameters
-
size | the size of reseved bytes |
file | the file of the malloc |
line | the line number of the allocation |
All Rights Reserved. Author Rick Blommers
The documentation for this class was generated from the following files: