casacore
|
Class to write begin and end block message. More...
#include <MemoryTrace.h>
Public Member Functions | |
MemoryTraceBlock (const std::string &name) | |
The constructor writes a block begin message. More... | |
MemoryTraceBlock (const char *name) | |
~MemoryTraceBlock () | |
The constructor writes a block end message. More... | |
Private Attributes | |
std::string | itsName |
Class to write begin and end block message.
This class is meant to write memory trace messages indicating the beginning and end of a code block. In this way it is known that the (de)allocate messages between these messages belong to that code block. The constructor writes the begin message, while the destructor writes the end message. Because the destructor is called automatically by the compiler, the user does not have to worry about it; it will also work fine in case of a premature exit from a function.
It is possible to nest blocks as deeply as one likes.
Definition at line 135 of file MemoryTrace.h.
casacore::MemoryTraceBlock::MemoryTraceBlock | ( | const std::string & | name | ) |
The constructor writes a block begin message.
casacore::MemoryTraceBlock::MemoryTraceBlock | ( | const char * | name | ) |
casacore::MemoryTraceBlock::~MemoryTraceBlock | ( | ) |
The constructor writes a block end message.
|
private |
Definition at line 144 of file MemoryTrace.h.