DeepARSDK / quickstart-ios-swift

DeepAR SDK for iOS example project
https://developer.deepar.ai
MIT License
23 stars 9 forks source link

Memory leak when deepAR.createARView(withFrame:) #30

Open wammy67 opened 4 months ago

wammy67 commented 4 months ago

Description:

I've encountered a memory leak issue when creating and creating instances of ARView provided by the DeepAR framework in my iPadOS application. This leak persists even after explicitly removing the view from its superview and setting the reference to nil.

Steps to Reproduce:

IMAGE 2024-03-17 20:28:54

Environment: DeepAR SDK version: 5.5.2 iPadOS version: 16.4.1 Device: iPad pro gen 3 Xcode version: 15.1

I appreciate your assistance in addressing this issue. Please let me know if you require any further information or clarification.

Stacktrace:

IMAGE 2024-03-17 20:29:17

igor-aradski commented 1 month ago

Could you check if the issue is present with the newest version of the SDK? Also, could you test it on the quickstart example or provide the minimal changes necessary to reproduce the bug?

Thank you!

MikheilMuchaidze commented 1 month ago

Hello Igor, sorry fo a late reply but I tried things on example app and will describe not. So first of all in your example app you have navigation from one controller to another but it isn't properly configured so when you build you are instantly on the screen with camera view on it. I configured app so that you start from blank screen with button to navigate to a screen with DeepAR view. And here begins problem. I'll describe steps to create memory leak.

  1. Config app to have nagivation to a screen with DeepAR functionalities
  2. Load app with first screen
  3. Press button to navigate to a DeepAR screen
  4. Go back on the initial screen
  5. Go again to a DeepAR screen and in this moments memory leak appears, I guess on reinit of DeepAR enging?

I have tested on Iphone 13 pro max, lates iOS, and latest DeepAR (5.6.4) So problem exists on example app too and also with ours

image image image

MikheilMuchaidze commented 1 month ago

@igor-aradski