Code inspection: Creating a managed type is not supported
This inspection reports new expressions that create managed types inside code compiled by the Burst compiler.
Burst targets a high-performance, restricted subset of C# and only supports unmanaged, Burst-compatible data. Creating managed objects such as object, List<T>, exceptions, or other reference types inside Burst-compiled code is not supported, as it requires managed heap allocation and garbage collection.
Example
In this example, the new List<int>() expression is used inside the Execute method of a Burst-compiled job. This is not supported and will be flagged.
Quick-fix
This inspection does not provide a dedicated quick-fix. Fix it manually by removing the managed allocation and replacing it with Burst-compatible data, such as instance fields, job data, or a supported native container.