(Case 1396199) NetworkDriver.BeginSend() and EndSend() generates GC

Hi. I found that NetworkDriver.BeginSend() and EndSend() generates GC. Both Editor and IL2CPP player.

You can easily reproduce it by implementing local send/receive code.

Reported as Case 1396199.

This is likely caused by our use of Burst function pointers in these methods. When called from managed code, they end up generating GC. We're aware of the issue and are looking into solutions to address this.

In the meantime, our recommendation to avoid the GC is to call these methods from a Burst-compiled job. I understand this might not be the most practical solution for everyone, which is why we're working on solutions to make these methods avoid GC when called from managed code.

1 Like

I confirmed that burstify Begin/EndSend() makes GC disappeared. Thanks.