Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::ReferencedObject Class Reference

Reference counted base class. More...

#include <inti/object.h>

Inheritance diagram for Inti::ReferencedObject:

Inti::ReferencedBase Inti::G::Boxed Inti::G::Condition Inti::G::Date Inti::G::IOChannel Inti::G::MarkupParseContext Inti::G::Mutex Inti::G::PatternSpec Inti::G::Rand Inti::G::Scanner Inti::G::ThreadPool Inti::G::Timer Inti::Gdk::PixbufFormat Inti::Gdk::Region Inti::Gtk::TargetList Inti::Node Inti::Pango::Attribute Inti::Pango::AttrIterator Inti::Pango::Coverage Inti::Pango::Item Inti::Pango::LayoutIter Inti::Pango::LayoutLine Inti::Slot List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

Reference counted base class.

ReferencedObject is a reference counting base class. Derived from ReferencedBase, it adds an integer reference counter so that dynamic objects can have their memory allocation handled by the Inti smart pointer: Pointer<>. This keeps the memory management in Inti 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.

Note if you declare a class that derives from ReferencedObject on the stack you don't need to call unref();


Member Function Documentation

virtual void Inti::ReferencedObject::unref  )  [virtual]
 

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.

Reimplemented from Inti::ReferencedBase.

Reimplemented in Inti::G::IOChannel.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:07 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002