Search Issue Tracker

Fixed in 2017.2.0f3

Fixed in 2017.1.X, 2017.2.X

Votes

0

Found in

2017.1.0f3

Issue ID

935845

Regression

No

List.Sort causes memory allocations with .NET 4.6 runtime, but not .NET 3.5

Mono

-

To reproduce:

1. Open the project, attached by the tester (ListSortAllocations.zip)
2. Open the "scene" scene
3. Make sure that Scripting Runtime Version is .NET 4.6
4. Open the Profiler and enable Deep Profile
5. Launch the game
6. After a few second, examine GC Alloc column in the Profiler. You'll find that TestListSort.Update call (which call the List.Sort method) allocates some memory

Expected: List.Sort does not generate garbage when Scripting Runtime Version is .NET 4.6
Actual: List.Sort generates garbage in .NET 4.6, but does not in .NET 3.5

Reproduced in 2017.1.0a6, 2017.1.0p2, 2017.2.0b4, 2017.2.0b5, 2017.3.0a2

Fixed in 2017.3.0a5

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.