InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
grRefCountedObj Class Referenceabstract

#include <GRRefCountedObj.h>

Inheritance diagram for grRefCountedObj:
IDVPlatformOffscreenIFontGroupIFontGroupIdIFontInstanceIHyphenatedWordIkfStyleIPMFontIRectRegion

Public Member Functions

 grRefCountedObj ()
 
virtual ~grRefCountedObj ()=0
 
virtual void AddRef () const
 
virtual void Release () const
 

Protected Attributes

int32 fRefCount
 

Detailed Description

grRefCountedObj is the base class for various objects that require reference counting to control their lifetimes. Objects of this kind should typically be created on the heap using new, rather than on the stack.

See Also
IPlatformOffscreen
IFontGroup
IFontGroupId
IFontInstance
IHypenatedWord
IkfStyle
IPMFont

Constructor & Destructor Documentation

grRefCountedObj::grRefCountedObj ()
inline

Simple constructor. Creates object with ref count of 1.

virtual grRefCountedObj::~grRefCountedObj ()
pure virtual

Destructor.

Member Function Documentation

virtual void grRefCountedObj::AddRef () const
virtual

Increases ref count by 1.

virtual void grRefCountedObj::Release () const
virtual

Decreases ref count by 1. If ref count becomes zero, deletes the object.