PIPS-NLP
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
IotrRefCount Class Reference

#include <IotrRefCount.h>

Inheritance diagram for IotrRefCount:
DoubleMatrix DoubleStorage OoqpVector GenMatrix SymMatrix DenseStorage PetscSparseStorage SparseStorage PetscVector SimpleVector StochVector

Public Member Functions

int refs ()
 
 IotrRefCount ()
 

Static Public Member Functions

static void release (IotrRefCount **obj)
 
static void addRef (IotrRefCount *const *obj)
 

Static Public Attributes

static int instances = 0
 

Protected Member Functions

virtual ~IotrRefCount ()
 

Private Member Functions

IotrRefCountoperator= (const IotrRefCount &)
 
 IotrRefCount (const IotrRefCount &)
 

Private Attributes

int mRefs
 

Detailed Description

A base class for classes that support reference-count garbage collection.

Constructor & Destructor Documentation

IotrRefCount::IotrRefCount ( )
inline

Default constructor. Creates an instance with one reference

virtual IotrRefCount::~IotrRefCount ( )
inlineprotectedvirtual

Protected virtual destructor. One should not call delete on reference-counted objects.

IotrRefCount::IotrRefCount ( const IotrRefCount )
inlineprivate

Copy constructor. Make sure the reference count for the new object equals one. In general, IotrRefCount objects should not be copied this way, which is why this constructor is private.

Member Function Documentation

IotrRefCount& IotrRefCount::operator= ( const IotrRefCount )
inlineprivate

Operator =. Makes sure that even though all other variables are copied, the reference count is not! In general, IotrRefCount objects should not be copied this way, which is why this operator is private.

int IotrRefCount::refs ( )
inline

The number of references to this object.

Member Data Documentation

int IotrRefCount::instances = 0
static

The number of instances of IotrRefCount. This is useful for debugging purposes. If not zero when the program exits, you have a memory leak.

int IotrRefCount::mRefs
private

The number of (hard) references to this object


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