Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0f3
Issue ID
993826
Regression
No
List.Sort(System.Comparison<T> comparison) generates garbage
Steps to reproduce:
1. Open attached “ListSortGCAllocTest.zip” Unity project
2. Open “ListSortGCAllocTest” scene
3. Open Window->Profiler
4. Enable Record and Deep Profile in Profiler window
5. Enter Play mode
-Notice that garbage is generated in Update.ScriptRunBehaviourUpdate by ListSortGCAllocTest.SortComparison() method
Expected results:
No garbage is generated by List.Sort(Comparison<T> comparison) and GC Alloc is 0 B
Actual results:
Garbage is generated by List.Sort(Comparison<T> comparison) and GC Alloc >0 B
Reproduced in: 2018.2.0a1, 2018.1.0b5, 2017.3.1f1, 2017.2.1p3, 2017.1.3p1, 2017.1.0a1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
Add comment