IRefObject Class Reference
 
 
 
IRefObject Class Reference

#include <IRefObject.h>

Inheritance diagram for IRefObject:
MaxHeapOperators ARefObject ICustomRenderItem IDisplayCallback IRenderGeometry ChildObjectDisplayCallback

Class Description

This class is similar to IUnknown in COM except that this class don't have a QueryInterface function.

A class that implements IRefObject interface means that an instance of that classes can be shared by multiple owners. Each owner holds a reference to that instance. Once an owner doesn't need that instance, Release() of that instance must be called by the owner and then the reference count of that instance will be decreased by one.

An instance of such class will be deleted automatically if its reference count is zero.

Public Member Functions

GraphicsUtilityAPI  IRefObject ()
virtual GraphicsUtilityAPI  ~IRefObject ()
virtual long  AddRef ()=0
  increase reference count of this object by one
virtual long  Release ()=0
  decrease reference count of this object by one, if the decreased reference count equals zero, the object will be deleted.

Constructor & Destructor Documentation

GraphicsUtilityAPI IRefObject ( )
virtual GraphicsUtilityAPI ~IRefObject ( ) [virtual]

Member Function Documentation

virtual long AddRef ( ) [pure virtual]

increase reference count of this object by one

Returns:
increased count

Implemented in ARefObject.

virtual long Release ( ) [pure virtual]

decrease reference count of this object by one, if the decreased reference count equals zero, the object will be deleted.

Returns:
decreased count

Implemented in ARefObject.