|
iDRS™ SDK 16
|
Base class for all iDRS pointer classes. More...
#include <idrs_common.h>
Base class for all iDRS pointer classes.
It provides a safe way to use pointers on classes inheriting CObj because it correctly uses the reference counter of the CObj class.
All iDRS classes that inherit the "CObjPtr" class (like CPageRecognition, CPage and CImgProcessor ) use "smart pointers". The memory area pointed to by a smart pointer is associated with a reference counter and this reference counter is updated during the creation, copying and destruction. The memory is freed when this reference counter reaches 0.
For example:
Of course, it isn't necessary to do aPage2 = NULL, the CPage destructor will decrement the counter itself.