# Potential Memory leak on Image Detection example scene

**URL:** <https://community.nianticspatial.com/t/potential-memory-leak-on-image-detection-example-scene/2578>\
**Category:** Bug Reports\
**Created:** [September 3, 2022, 5:07am UTC](https://community.nianticspatial.com/t/potential-memory-leak-on-image-detection-example-scene/2578 "2022-09-03T05:07:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Monaghan](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/ben_monaghan/32/1152_2.png) [@Ben\_Monaghan](https://community.nianticspatial.com/u/Ben_Monaghan)\
**Post date:** [September 3, 2022, 5:07am UTC](https://community.nianticspatial.com/t/potential-memory-leak-on-image-detection-example-scene/2578/1 "2022-09-03T05:07:45Z")

</div>

Issue category: Unity Example Package  
Device type & OS version: iPad Pro (11 inch) (2nd Generation) iOS 15  
Host machine & OS version: Mac Monterey 12.5  
Issue Environment : On Device  
Xcode version: 13.4.1  
ARDK version: 2.2.0  
Unity version: 2020.3.33f

Bug reproduction steps:

1. Create a blank Unity project
2. Import ARDK 2.2.0 and ARDK Examples
3. Follow setup tutorial to build for iOS
4. Open the ARDK Examples folder and add the “Scene Selector” followed by the “Image dection” scenes into the build settings.
5. Build project, open in Xcode and run on deveice
6. (On device) Tap the ImageDection Scene to enter the image detection scene.
7. (On Device) 5 finger tap to return to the “Scene Selector” scene.  
8 Repeat steps 6-7 until device crashes.

Hello Lightship community 👋, I am building an application that Uses ARDK and more specifically Image Detection. I am building off of the Image detection scene provided in the ARDK examples. During some QA we noticed our app would crash if the Image dection scene was reloaded/enetered multiple times.

Ive managed to narrow this down to the Image Detection scene, as other AR scenes do not seem to have this issue. When looking in Xcode memory profiler we can see everytime the Image detection scene is loaded it adds around 200mb into memory that is never released.

 ![Screen Shot 2022-09-03 at 2.30.13 pm](https://us1.discourse-cdn.com/niantic/original/2X/4/4e2f11e3a08ac4976ce435ccb7a5d11da49198a3.png)

This image is a result of me following the above steps

My questions are:

1. Are extra steps needed to properly enter and leave the Image Detection scene? Currently im just using SceneManager.LoadScene(\_sceneName); as per the Scene selector logic. Selecting “Manage Using Unity Lifecycle” On AR session manager doesnt seem to help either.

2. Am I missing something obvious here, is this a known issue?

I have tried to do my due diligence regarding this issue and have not found other posts in discord or this forum (apart from one that was never resolved), so my apologies if this a mistake on my end.

Thanks for taking your time to look into this and I appreciate any discourse.

- Ben

---

<div class="post-metadata">

**Author:** ![rob\_link](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/rob_link/32/1176_2.png) [@rob\_link](https://community.nianticspatial.com/u/rob_link)\
**Post date:** [September 5, 2022, 8:11pm UTC](https://community.nianticspatial.com/t/potential-memory-leak-on-image-detection-example-scene/2578/2 "2022-09-05T20:11:28Z")

</div>

Hi @Ben_Monaghan!

There shouldn’t be any extra steps necessary for entering and exiting the Image Detection sample scene. Thank you for informing us of this – I’ve filed a report to notify the team of this issue.

---

<div class="post-metadata">

**Author:** ![francis](https://avatars.discourse-cdn.com/v4/letter/f/ac8455/32.png) [@francis](https://community.nianticspatial.com/u/francis)\
**Post date:** [December 19, 2022, 3:35pm UTC](https://community.nianticspatial.com/t/potential-memory-leak-on-image-detection-example-scene/2578/3 "2022-12-19T15:35:41Z")

</div>

i face the same issue is it fixed?

---

<div class="post-metadata">

**Author:** ![rob\_link](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/rob_link/32/1176_2.png) [@rob\_link](https://community.nianticspatial.com/u/rob_link)\
**Post date:** [December 19, 2022, 5:42pm UTC](https://community.nianticspatial.com/t/potential-memory-leak-on-image-detection-example-scene/2578/4 "2022-12-19T17:42:50Z")

</div>

Hello @francis – we’re planning on addressing this issue in a future ARDK release.

---

<div class="post-metadata">

**Author:** ![Maverick\_Niantic](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Maverick\_Niantic](https://community.nianticspatial.com/u/Maverick_Niantic)\
**Post date:** [March 5, 2026, 11:46pm UTC](https://community.nianticspatial.com/t/potential-memory-leak-on-image-detection-example-scene/2578/5 "2026-03-05T23:46:54Z")

</div>

Closed on March 5, 2026, 11:46pm UTC

Age
