Free Electron
|
Watches the usage of reference counted objects. More...
#include <Tracker.h>
Public Member Functions | |
Tracker (String name) | |
void | suppress (void *pPtr) |
void | acquire (void *pPtr, String name, U32 newcount) |
void | release (void *pPtr, String name, U32 newcount) |
void | addReference (void *pPtr, void *pReference, String what) |
void | removeReference (void *pPtr, void *pReference) |
void | registerRegion (void *pPtr, void *pT, U32 bytes, String name) |
Register a block of memory. More... | |
void | deregisterRegion (void *pPtr) |
String | report (void) const |
Generate a report of current object usage. More... | |
U32 | totalCount (void) const |
Private Member Functions | |
void | change (BWORD release, void *pPtr, String name, U32 newcount) |
void | changeReference (BWORD remove, void *pPtr, void *pReference, String what) |
String | reportAt (std::map< void *, Track >::const_iterator it, std::map< void *, Track >::const_iterator itRoot, U32 depth, BWORD &rCycled) const |
Private Attributes | |
std::map< void *, Track > | m_trackMap |
String | m_name |
Watches the usage of reference counted objects.
Counted has debugging mechanisms that manipulate a Tracker during validation. It can be printed using Counted::reportTracker().
A major singleton (like Registry in the plugin mode) may set up and maintain another Tracker automatically (such as for Component) while in an appropiate debugging mode.
void fe::Tracker::registerRegion | ( | void * | pPtr, |
void * | pT, | ||
U32 | bytes, | ||
String | name | ||
) |
Register a block of memory.
pPtr is the object as a common form, such as Counted. pT is the start of the actually allocated block.
String fe::Tracker::report | ( | void | ) | const |
Generate a report of current object usage.