Search Issue Tracker

Won't Fix



Found in


Issue ID




[iOS] Memory leak when unloading assets with OpenGLES on A9 and A10 devices



Memory is leaked each time assets are unloaded (1.5, 2.0 or 2.5 KB at a time) on A9 and A10 iOS devices.

Steps to reproduce:
1) Open the attached build.
2) Make a Release iOS build with OpenGLES 2 or 3.
3) Run on an A9 or A10 device (iPhone SE, iPhone 7 or 7 Plus).
4) Attach the Allocations tool to the process (using Instruments).

Two scenes are loaded and unloaded continuously. Each time a scene is unloaded, a small amount of memory is leaked, leading to a crash due to memory outage. Looking at the allocation stack trace, AGXMetalA10 library is responsible for the leak. This does not occur with Metal. Also doesn't occur on older devices (A8, etc.).
Happens with both OpenGLES 2 and 3.

Reproduced on:
Unity 5.6.0b3, 5.5.0p4, 5.4.4f1

Devices tested:
iPhone 7 Plus, iOS 10.2 (A10) - reproduced
iPhone 7, iOS 10.2.1 (A10) - reproduced
iPhone SE, iOS 10.0.2 (A9) - reproduced
iPhone 6 Plus, iOS 10.2 (A8) - did not reproduce
iPhone 5S, iOS 9.1 (A7) - did not reproduce


The issue has been identified as a bug in iOS, as it is possible to reproduce it on non-Unity apps that recreate shaders repeatedly. A bug report has been submitted to Apple (30971525), closing this bug as WONTFIX.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.