JetBrains Rider 2025.3 Help

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.

using System.Collections.Generic; using Unity.Burst; using Unity.Jobs; [BurstCompile] public struct ExampleJob : IJob { public void Execute() { // Reported: Creating managed types is not supported in Burst var values = new List<int>(); } }
using Unity.Burst; using Unity.Collections; using Unity.Jobs; [BurstCompile] public struct ExampleJob : IJob { public NativeArray<int> values; public void Execute() { // Use Burst-compatible value types or native containers var first = values[0]; } }

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.

26 March 2026