Support Forum

What does BatchedEvents for RichAI and how to prevent GC?

Hi!

I have some number of units, mb around 200.

and I’ve noticed that some times RichAI drops some garbage, even if I’m not doing anithing.

  1. What can I do to prevent GC?

  2. And I’d like to know what BatchedEvents does?

I’m using 4.3.19

Hi

It might be many things.
Do you think you could profile using deep profiling to narrow it down?

Oh, yep

@aron_granberg can you help with GC ? )

Hi

Sorry for the late reply.
That comes from allocating a NativeArray. In the editor Unity needs to allocate a managed object called the DisposeSentinel for tracking memory leaks. However this allocation will not be present in standalone builds (I’m not 100% sure it is always excluded, but it will at least be if you disable the burst safety checks).

1 Like