Scopira  20080306
scopira::tool::objrefcounter Class Reference

#include <object.h>

Public Member Functions

 objrefcounter (void)
 
 ~objrefcounter ()
 
void foo (void) const
 

Static Protected Attributes

static int dm_ref
 
static int dm_peak
 
static int dm_tot
 
static int dm_baddel
 
static int dm_real
 

Friends

class object
 

Detailed Description

Internal, singleton like class usefull for debuggin. This class summarized and prints all the add_refs and sub_refs done throughout the application. Any inbalances will be reported.

Only available (and thus used) in debug mode.

Author
Aleksander Demko

Constructor & Destructor Documentation

◆ objrefcounter()

scopira::tool::objrefcounter::objrefcounter ( void  )

Construct the class. This should be done in your main method (or similar) and defore any reference counting methods (withing object) have been called)

Author
Aleksander Demko

◆ ~objrefcounter()

scopira::tool::objrefcounter::~objrefcounter ( )

Destruct the class and report the counts. This should be done after all reference counting methods have been called (neat the end of your main (or similar).

Author
Aleksander Demko

Member Function Documentation

◆ foo()

void scopira::tool::objrefcounter::foo ( void  ) const
inline

Just to avoid "class unused" compiler warnings when you instantiate this class.

Author
Aleksander Demko

References scopira::tool::object::add_ref(), and scopira::tool::object::sub_ref().


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