Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.1
2020.2
2021.1
2021.2.0a2
Issue ID
1309660
Regression
No
[iOS] [Metal] Graphics memory is not released when switching between scenes
Steps to reproduce:
1. Open user's attached project in "case_1293458-VulkanUnableToUnloadGraphicsMemory.zip"
2. Enable development build (File -> Build settings)
3. Build for iOS and open the project in Xcode
4. Go Product -> Scheme -> Edit scheme
5. Under Diagnostics enable Metal API validation
6. Under options set GPU Frame Capture to Metal
7. Deploy the project to a Device
8. Capture GPU Frame and inspect the Memory
9. Resume the application, Switch to Scene2, and then Scene1 again
10. Capture GPU Frame and inspect the Memory (read note 2)
Expected results: Memory usage will be the same as in step 8
Actual results: Memory usage is increased, bound unused Shadowmap and UnityAttenuation are visible in the memory
Reproduces on: 2019.4.17f1, 2020.1.17f1, 2020.2.0f1, 2021.1.0a10
Could not test: 2018.4.30f1 (due to project breaking)
Reproducible with these devices:
iPad Pro 12.9 1st gen (13.4.1)
iPhone 6S (iOS 13.3.1)
iPhone 12 Pro (iOS 14.2.1)
Notes:
1. Screenshots are attached
2. This can be tested by inspecting the RAM and without capturing the GPU frame. The RAM will have increased after switching back from the second scene to the first compared to when the app was first launched (~50MB)
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (2021.1.X):
There are no resources leaked. The Metal backend has resized internal buffers to be able to render second scene without reallocations.