Skip to content

Memory leak when using in SwiftUI #395

@gburai

Description

@gburai

Step 1: Are you in the right place?

  • Yes, issue also affects the sample SwiftUI code in this repository

Step 2: Describe your environment

Step 3: Describe the problem

If the scanning view is used inside a SwiftUI view, and I try to scan an image which is hard to scan for some reason, the memory usage jumps significantly, even above 1-2 GB, causing the app to crash eventually.

I've tried to use the SDK in SwiftUI in many different ways, but could not pinpoint the cause of the memory leak, I've also tried out the code from the Sample folder and the issue still persists.

The issue is not critical, as it is only causing a problem if a document is very hard to read, I could only test it with a fake ID card, but it indicates a serious memory leak in the SDK.

Step 4: Relevant code

Try to scan a hard-to-read (e.g. Text overlay on the image) document with the sample SwiftUI code in this repository and monitor memory usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions