Search Issue Tracker
Fixed in 2018.3.X
Fixed in 2018.2.X
Votes
0
Found in
2018.1.5f1
Issue ID
1066405
Regression
No
[.NET 4.x][IL2CPP] MultiCastDelegate is leaking memory in Built projects
To reproduce:
1. Download attached project "LeakTestCase.zip" and open in Unity
2. Open "SampleScene" scene
3. Set Scripting Runtime Version to ".NET 4.6 or .NET 4.x"
4. Set Scripting Backend to "Mono"
5. Build & Run on any platform
6. Observe that the onscreen memory usages stay fixed
7. Set Scripting Backend to "IL2CPP"
8. Build & Run on any platform
Expected results: Like in Mono, the onscreen memory usages stays fixed
Actual results: There is a memory leak in "foo += handler; foo -= handler;" because the memory counter keeps climbing
Notes:
- This issue appears on both Windows and OSX
- This issue reproduces on Android, iOS, and Standalone
- On .NET 3.5 everything works as expected no matter which Scripting Backend is set
Reproduced on Unity 2017.2.3p3, 2017.3.2f1, 2017.4.8f1, 2018.1.9f1, 2018.2.2f1 and 2018.3.0a7
Comments (2)
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
- A different Font Asset is applied when the original Font Asset is deleted while UI Builder is open
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
Dave-Hampson
Sep 05, 2018 17:26
It is not fixed in 2017.4.6, only 2018.2.5 and higher
Kai_NaN
Sep 05, 2018 15:46
Could you also test this on Nintendo Switch platform? I found memory usage going up when call foo -= handler. It's 2017.4.6f1 with .NET 3.5, Nintendo Switch SDK 5.4.0.