quickstart-ios-swift icon indicating copy to clipboard operation
quickstart-ios-swift copied to clipboard

Memory leak when deepAR.createARView(withFrame:)

Open wammy67 opened this issue 1 year ago • 4 comments

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:

  • Initialize a new ARView instance using deepAR.createARView(withFrame:)
  • Add the view to a superview.

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

wammy67 avatar Mar 17 '24 19:03 wammy67

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!

igor-aradski avatar May 21 '24 12:05 igor-aradski

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 avatar Jun 09 '24 15:06 MikheilMuchaidze

@igor-aradski

MikheilMuchaidze avatar Jun 12 '24 10:06 MikheilMuchaidze

Any news about this issue?

wammy67 avatar Aug 27 '24 11:08 wammy67