clearPersistentCache static method

void clearPersistentCache()

Clears any library-level memory caches. There are a variety of expensive-to-load constant data structures (mostly language dictionaries) that are cached globally – surviving the Init() and End() of individual TessBaseAPI's. This function allows the clearing of these caches.

Implementation

static void clearPersistentCache() {
  final tesseract = Tesseract();
  try {
    bindings.flusseract.ClearPersistentCache(tesseract.handle);
  } finally {
    tesseract.dispose();
  }
}