ObjectARX Reference Guide > Miscellaneous Classes > AcHeapOperators Class
AcHeapOperators
Class Hierarchy
C++
class AcHeapOperators;
File

AcHeapOpers.h

Description

This class provides local new and delete operators to any class that derives from it. Starting in ObjectARX for AutoCAD 2004, this class is a second base class for AcDbObject and replaces the local new and delete operators for AcDbObject

Objects that inherit from AcHeapOperators are guaranteed to be allocated on the AcDb heap. AcHeapOperators resolves memory allocation conflicts for objects in applications that are built with a version of the C runtime library that differs from the one used by AutoCAD's memory manager. 

Classes that override the AcDbObject::new and delete operators should not require changes to accommodate the AcHeapOperators derivation. 

Applications that define objects that do not inherit from AcDbObject--for instance, those that derive from AcGiDrawable or directly from AcRxObject--may derive from AcHeapOperators to gain minor performance benefits, and to avoid memory conflicts between different versions of the C runtime library. The implementation of AcHeapOperators is exported in acdb17.lib

 

Links