Support Forum

Preallocate cause excessive GC Alloc


It seems both the Burst example and my attempts to use CommandBuilder.Preallocate cause excessive GC alloc, per frame, on Unity 2020 LTS + macOS.

Unsure why this happens, unsure if Preallocate() is working as intended, without this line no GC alloc are observed and the scene render just fine.


This allocation is part of some error checking code. It will be removed in your final build, or if you disable burst safety checks.

Thx, I will check it in build and report back if there are more GC.

1 Like