C++ Memory Management
 
 

Wherever you create an FDO object whose class definition inherits from GisIDisposable, wrap it in a GisPtr, which is the FDO version of a reference counting smart pointer. When the object goes out of scope, the memory allocated for it is released.

You can use GisPtr for your own classes by inheriting from the abstract class GisIDisposable and providing an implementation for the Dispose() method (typically delete this;).