|
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
(comments are locked)
|

I am also very interested in this...
Incidentally the GC.Collect() can only occur every frame if your heap size is small, mine was more like 3MB and this takes a long time to collect, especially on mobile. We've taken Unity's advice and:
We're still trying to find out what is allocating, but I've not profiled for memory leaks lately...
Any news on this? I'm also seeing this in my project. It's the only thing allocating any memory while the game is running, so I'd really like to get rid of it.
I chatted to someone at Unite about this - practical upshot is that it's some internal Unity thing.
Also should point out that in Unity 3 there are significant differences and inaccuracies between deep profile and ordinary profile mode when viewing memory allocations.