Tesseract::~Tesseract() { Clear(); end_tesseract(); sub_langs_.delete_data_pointers(); // Delete cube objects. if (cube_cntxt_ != NULL) { delete cube_cntxt_; cube_cntxt_ = NULL; } if (tess_cube_combiner_ != NULL) { delete tess_cube_combiner_; tess_cube_combiner_ = NULL; } }
// Close down tesseract and free up memory. void TessBaseAPI::End() { ResetAdaptiveClassifier(); end_tesseract(); }