Skip to content

Free Up Memory

After the SDK is initialized and running, it may consume hundreds of megabytes. In the most cases, once the processing of identity documents is finished, there is no need to keep the SDK in the memory. The operating system can kill it if the app works in the background and consumes too much memory.

To prevent excessive memory consumption, you can:

  1. Initialize the SDK.
  2. Perform processing of identity documents.
  3. When finished using the SDK, deinitilize it:
DocReader.shared.deinitializeReader()

That's it. By doing this, you will free up the consumed by the SDK memory and won't experience unexpected crashes.

Next Steps