Quick answer: Unity Burst compile error leaving job handles allocated? Failed compile aborts scheduling; native containers never disposed - track allocations independently and dispose on compile failure.

Burst rejects a job; NativeArray allocated for the job remains allocated; eventual OOM.

Use try/finally for native allocs

try { schedule; } finally { Dispose; }

Cleanup runs regardless of compile success.

Or pre-validate jobs

BurstCompiler.CompileFunctionPointer at startup. Failures surface before allocation.

Track native containers per job

Per-job allocation list; cleanup on completion or failure.

“Burst failures don't propagate to your cleanup. Cleanup is responsibility.”

If your project allocates native containers per job, the try/finally is the safe pattern. Document.

Related reading