Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Diagnostic code · ARA0300

Allocation on the tick path

A [Query] system, behaviour OnTick/OnFrame, or command Execute allocates on its tick path, including inside nested lambdas and local functions. This is a warning: compilation can succeed, but repeated allocations can cause GC pauses.

Common causes

  • Creating classes or arrays, calling LINQ, boxing values, or declaring non-static lambdas.
  • Building strings with interpolation or concatenation on the tick path.

Fixes

  • Use value types, spans, bounded stackalloc, or reusable pooled buffers instead of per-tick heap objects.

  • Replace allocating LINQ with loops, avoid boxing, and use static lambdas where possible.

  • Move string formatting and other avoidable allocations out of recurring tick work.

  • Code: ARA0300

  • Constant: cs::TICK_ALLOCATION

  • Reported by: Ara.Analyzers