ImageGear .NET v24.12 - Updated
Object Structure, Lifetime, and Disposal
User Guide > How to Work with... > OCR > Concepts > Object Structure, Lifetime, and Disposal

This topic provides information about the following:

Recognition API Object Structure

The Recognition API uses a simple object structure with two top-level objects: ImGearRecognition, which represents the recognition engine, and ImGearRecPage, which represents a page with an associated image and recognition data. Visually, the hierarchy looks like the following:

ImGearRecognition
 + - Modules (ImGearRecModuleCollection)
 | + - [] (indexer) (ImGearRecModule)
 | + - MOR (ImGearRecMORSettings)
 + - Preprocessing (ImGearRecPreprocessingSettings)
 + - Recognition (ImGearRecRecognitionSettings)
 | + - UserDictionary (ImGearRecUserDictionary)
 + - OutputManager (ImGearRecOutputManager)
   + - Formats (ImGearRecOutputFormatCollection)
     + - [] (indexer) (ImGearRecOutputFormat)

ImGearRecPage
 + - Image (ImGearRecImage)
 + - Statistics (ImGearRecStatistics)
 + - Zones (ImGearRecZoneCollection)
   + - [] (indexer) (ImGearRecZone) 

The Recognition API uses a simple object structure with two top-level objects:

Common Reasons to Call the Dispose Method

Under normal circumstances an application is not required to call a Dispose method. The most common reasons to call this method are:

When the application adds an ImGearRecPage object to an ImGearRecDocument object, the latter takes ownership of the internal data of ImGearRecPage object, which then becomes invalid. If the application needs to re-recognize the image that has been added to a document, it should re-import it from ImGearPage. There’s no need to dispose a page explicitly after it has been added to a document.