uGUI allocates memory on each frame

I was just profiling an otherwise empty scene, with a Canvas, a Panel and an EventSystem and the GUI system allocates memory on each frame without nothing going on.

The EventSystem allocates 52 bytes each frame in EventSystem.Update().

The Canvas (if there’s anything on it, like the Panel) allocates 100 bytes each frame in Canvas.SendWillRenderCanvases().

What’s up with that, is it something you would be able to fix?

I can confirm this; EventSystem.Update() → StandAloneInputModule → PointerInputModule.GetMousePoint() → EventSystem.RaycastAll() allocates 52 bytes.

I’d say, if you’re sure - report it as a bug =).

yes please report a bug as we should be able to fix it.

Hi, I’ve removed these allocations :slight_smile:

5 Likes

Awesome. New beta soon-soon? :slight_smile:

We are working on it, no ETA

1 Like

This is happening still with 5.0.2p4. Is this normal or a bug?

(I’ve attached Profiler screenshot)

for me, in Unity 5.2.0f2 the EventSystem.Update allocates 24 bytes each frame (Windows32 build)

Bug number 723235