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
- NullReferenceException when setting 'isTextObjectScaleStatic' to false on a disabled TextMeshPro GameObject
- Shader Stripping Custom Options disappear when exiting Play mode without reloading Domain
- Decals do not get projected when 'Rendering Layer Mask' on a GameObject is 23rd Layer or above due to encoding/decoding issues
- Deriving from SearchContextAttribute doesn't always work
- Scripting API documentation is missing for macOS editor extensions
Add comment