aws-amplify / amplify-ui-swift-liveness

This repository offers a UI component for Amazon Rekognition Face Liveness, enabling developers to ensure that only authentic users, and not bad actors using spoofs, can access their services.
https://ui.docs.amplify.aws/swift/connected-components/liveness
Apache License 2.0
10 stars 25 forks source link

Strong reference cycle - objects not released from memory #129

Closed alekkova closed 7 months ago

alekkova commented 7 months ago

Describe the bug

Strong reference cycle between CameraPreviewViewModel and LivenessCaptureSession prevents objects to be released from memory after each liveness session. Please see screenshots from Xcode Memory Graph.

Screenshot 2024-04-18 at 15 27 06

Screenshot 2024-04-18 at 15 27 18

Steps To Reproduce

Steps to reproduce the behavior:
1. Perform full liveness session flow.
2. Perform another full liveness session flow.
3. Observe Xcode Memory Graph -> objects keep accumulating.

Expected behavior

Objects are released from memory after liveness session is completed.

Swift Liveness Version

1.2.9

Xcode version

15.2

Relevant log output

No response

Is this a regression?

No

Regression additional context

No response

OS Version

iOS 17

Device

iPhone 15

Specific to simulators

No response

Additional context

No response

phantumcode commented 7 months ago

@alekkova Thanks for submitting the issue. We'll investigate and provide updates here.

phantumcode commented 7 months ago

Fixed in version 1.2.12

github-actions[bot] commented 7 months ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.