#include <scim_object.h>
Inheritance diagram for scim::ReferencedObject:
Public Member Functions | |
bool | is_referenced () const |
void | ref () |
Increase an object's reference count by one. | |
void | unref () |
Protected Member Functions | |
ReferencedObject () | |
Constructor. | |
virtual | ~ReferencedObject ()=0 |
Destructor. | |
void | set_referenced (bool reference) |
ReferencedObject is a reference counting base class. it has an integer reference counter so that dynamic objects can have their memory allocation handled by the scim smart pointer: Pointer<>. This keeps the memory management in scim consistent across all classes. If you derive a class from ReferencedObject and allocate it on the heap, you free the memory and destroy the object by calling unref(), not delete.
Definition at line 60 of file scim_object.h.
|
Constructor.
|
|
Destructor.
|
|
Set the internal referenced flag. <
|
|
The referenced flag setting. <
|
|
Increase an object's reference count by one.
|
|
Decrease an object's reference count by one. < When the reference count becomes zero delete is called. Remember, with ReferencedObject < you must call unref() on dynmaically allocated objects, not delete. |