nub::ref_counts Struct Reference

#include <nub/refcounted.h>

List of all members.

Public Member Functions

void * operator new (size_t bytes)
void operator delete (void *space, size_t bytes)
bool is_owner_alive () const throw ()
void acquire_weak () throw ()
int release_weak () throw ()
void debug_dump () const throw ()

Friends

class nub::ref_counted


Detailed Description

nub::ref_counts manages strong+weak reference counts for nub::ref_counted objects. Its main purpose is to allow weak ref-counting; a client who wants to do weak ref-counting can get a hold of the nub::ref_counted object's nub::ref_counts, and then check whether is_owner_alive() to know whether the nub::ref_counted object is still valid. This technique is implemented by nub::soft_ref. The nub::ref_counts object will delete itself when both its strong and weak counts go to 0.

Definition at line 72 of file refcounted.h.


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

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:23 2008 by Doxygen version 1.5.5.