Go to the previous, next section.
#include <CNCL/Ref.h>
None
CNRefObj, CNRefNamed
CNPtr
CNRef
is outside of CNCL's inheritance tree and is always
used as a further base class of its children, which are also derived
from CNObject
.
With the help of reference counting you can track all references to
instances of CNObject
.
See see section CNPtr -- Intelligent pointer to CNRefObjs and the file tRef.c
in directory
CNCL/lib/misc/test
for examples.
Constructors:
CNRef();
CNRef
provides:
void ref();
void deref();
delete this;
! In this case you cannot
access this object any longer.
unsigned long get_count() const;
static void set_debug(bool r, bool = FALSE);
r
is set to TRUE
, all calls to ref()
and
deref()
are logged and a respective message is output to
cerr
. The second parameter has no funcionality, yet.
Go to the previous, next section.