What is SendMouseEvents and why is it allocating memory every frame?

Hi there, I’ve been doing some profiling recently and in the profiler I see that SendMouseEvents.DoSendMouseEvents() is always present and allocates 76 bytes (if the mouse is not over the game window) or around 1.8K when it is. Is this a real method or is it something to do with profiling the app? I am profiling in the editor ATM.

I ask because I have been following the advice of doing a GC.Collect() every 30 frames, but contrary to the advice this is profiling as taking around 12MS (and not 5MS) and that’s on the desktop, the amount of memory allocated in this time is small < 60K. Is this collection inflated in the profiler?

Thanks
Bovine

It seems to be an editor-only problem. It should not occur in a build.

https://forum.unity.com/threads/sendmouseevents-gc-collect-spike-issue.506963/#post-3306951