Search Issue Tracker
Fixed in 3.1.0-preview.7
Votes
4
Found in [Package]
2.0.2
Issue ID
1215035
Regression
No
[Mobile] Memory Leak when using AR Foundation and switching scenes
How to reproduce:
1. Open the attached project
2. Set iOS as build target
3. In Player settings, set camera usage description
4. Build the project for iOS
5. Build & Run to device via Xcode
6. Press "Game"
7. Press "MainMenu"
8. Repeat steps 6-7
Actual result: Unity leaks memory.
Expected result: Unity doesn't leak memory.
Reproducible with: 2019.2.20f1 (2.0.2), 2019.3.1f1 (3.1.0), 2020.1.0a23 (3.1.0).
Devices reproducible with:
- iPhone 8 Plus (iOS 12.0)
- iPhone X (iOS 11.3.1)
- iPhone 6S (iOS 13.3.1)
- VLNQA00230, Oneplus OnePlus6T (ONEPLUS A6013), Android 9, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
- VLNQA00277, Asus ROG Phone (ASUS_Z01QD), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
- VLNQA00315, Samsung Galaxy Note10 (SM-N970U), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
Notes:
- The leak is 10 times bigger on iOS 13 devices.
- Unity's memory profiler is not detecting the leak.
- In 2019.2.20f1 (AR F 2.0.2) the leak is a lot smaller but the leak is still visible.
- Can't test 2018.4 as the project breaks.
Comments (2)
-
adam_unity553
Oct 07, 2025 11:53
It is still reproducible on iOS using Unity 2022.3.62f2 and AR Foundation 5.2
-
GHSmediaSrl
Feb 24, 2020 14:51
I'm facing the same issue (Unity 2019.2.18f1, 2019.3.1f1) ARFoundation 3.0.1, 3.1.0 preview 4
+ iPhone 7 and iOS 13.3.1Please urgent solution needed
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note (fix version 3.1.0-preview.7):
Fixed in ARFoundation and ARKit XR 3.1.0-preview.7