MemoryLeakIndicator
|
Classes | |
class | LeakMap |
Class to access forgotten objects in memory. Inspired by Rainer Grimm and Mouaz Chamieh. More... | |
class | Trace |
Class to be able to write a TRACE output to the output window also in Releas mode. Found in http://blog.m-ri.de/index.php/2009/08/09/vs-tippstricks-einfache-ausgabe-mit-trace-auch-in-der-release-version/ More... | |
Typedefs | |
typedef bool | TbExceptionMode |
typedef int | TiOutput |
Enumerations | |
enum | SeekMode { START , NEXT , CURRENT } |
Functions | |
__mem_leak_indicator_export_dll MemSpy::LeakMap * | activateMemoryMonitoring (MemSpy::TbExceptionMode bExceptionMode=MemSpy::THROW) |
void __mem_leak_indicator_export_dll | finishMemoryMonitoring (MemSpy::TiOutput iOutput=MemSpy::OUTPUT_CONSOLE) |
Variables | |
const TbExceptionMode | NOTHROW = false |
const TbExceptionMode | THROW = true |
const TiOutput | OUTPUT_NON = 0 |
const TiOutput | OUTPUT_CONSOLE = 1 |
const TiOutput | OUTPUT_TRACE = 2 |
typedef bool MemSpy::TbExceptionMode |
Type to tell the MemSpy::activateMemoryMonitoring (...) function whether an exception is thrown on error, or just a 0 as return value.
typedef int MemSpy::TiOutput |
Type to tell the MemSpy::finishMemoryMonitoring (...) function whether to output to the console.
enum MemSpy::SeekMode |
To iterate through LeakMap::m_ObjectList.
Enumerator | |
---|---|
START | The first element is meant. |
NEXT | The next element after the current element is meant. |
CURRENT | The current element is meant. |
__mem_leak_indicator_export_dll MemSpy::LeakMap * MemSpy::activateMemoryMonitoring | ( | MemSpy::TbExceptionMode | bExceptionMode = MemSpy::THROW | ) |
Enables storage monitoring and instantiates the LeakMap.
This function should be called in the main at the beginning before instantiating objects.
[in] | bExceptionMode | See MemSpy::NoThrow and MemSpy::Throw. |
If | this function is called again, a std::range_error is thrown if bExceptionMode == MemSpy::THROW. |
void __mem_leak_indicator_export_dll MemSpy::finishMemoryMonitoring | ( | MemSpy::TiOutput | iOutput = MemSpy::OUTPUT_CONSOLE | ) |
Stops memory monitoring and removes the LeakMap from memory.
This function should be called in main at the end after object instantiation, so that information about memory leaks can be output if necessary.
[in] | iOutput | See MemSpy::OUTPUT_NON and MemSpy::OUTPUT_CONSOLE. |
const TbExceptionMode MemSpy::NOTHROW = false |
Function MemSpy::activateMemoryMonitoring (...) returns a 0 as return value in case of an error.
const TiOutput MemSpy::OUTPUT_CONSOLE = 1 |
Function MemSpy::finishMemoryMonitoring (...) outputs its information to the console.
const TiOutput MemSpy::OUTPUT_NON = 0 |
Function MemSpy::finishMemoryMonitoring (...) does not output anything. This can be useful if an output is to be printed to a GUI window.
const TiOutput MemSpy::OUTPUT_TRACE = 2 |
Function MemSpy::finishMemoryMonitoring (...) outputs its information iin the output window.
const TbExceptionMode MemSpy::THROW = true |
Function MemSpy::activateMemoryMonitoring (...) throws a std::range_error on error.