#include <IRefObject.h>
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. |
GraphicsUtilityAPI IRefObject | ( | ) |
virtual GraphicsUtilityAPI ~IRefObject | ( | ) | [virtual] |
virtual long AddRef | ( | ) | [pure virtual] |
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.
Implemented in ARefObject.