Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize function ObjectCache::DeleteUnusedObjects (fix issue with s…
…anitizers) The old code did not work with compiler option `-fsanitize=address,undefined` and caused apiexample_test to run forever with this error message: Running main() from unittest/third_party/googletest/googletest/src/gtest_main.cc [==========] Running 4 tests from 2 test suites. [----------] Global test environment set-up. [----------] 1 test from EuroText [ RUN ] EuroText.FastLatinOCR /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/debug/safe_iterator.h:608: In function: _Safe_iterator<type-parameter-0-0, type-parameter-0-1, std::bidirectional_iterator_tag> &__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<tesseract::ObjectCache<tesseract::Dawg>::ReferenceCount *, std::__cxx1998::vector<tesseract::ObjectCache<tesseract::Dawg>::ReferenceCount, std::allocator<tesseract::ObjectCache<tesseract::Dawg>::ReferenceCount>>>, [...] That error message was followed by an endless sequence of newlines. Signed-off-by: Stefan Weil <[email protected]>
- Loading branch information