libidx
|
#include <smart.h>
Public Member Functions | |
smart_pointer (const smart_pointer &other) | |
virtual int | unlock () |
Decrements reference counter and deallocates this if it reaches zero. | |
virtual int | lock () |
Increments reference counter. | |
virtual int | get_count () |
Returns the number of references to this object. | |
virtual void | set_count (int count) |
Sets the number of references to this object(careful) | |
Protected Attributes | |
int | refcount |
Reference counters of objects pointing to this idx. | |
std::string | debug_name |
Friends | |
class | svector |
An object that knows how many other objects are refering to it and destroys itself once nobody does anymore.