Hello Guest

Author Topic: tk2dUIManager.Update() GC Allocs  (Read 3647 times)

edb

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 43
    • View Profile
tk2dUIManager.Update() GC Allocs
« on: April 02, 2015, 07:59:02 pm »
I'm profiling my game on an Android tablet and found some GC Allocs of 56B in tk2dUIManager.Update() whenever I touched the screen.

I traced it down to tk2dUiManager/CheckInputs() and this call:

      foreach (Touch touch in Input.touches)

I changed it to:

        for (int i=0;  i<Input.touchCount;  i++)
        {
          Touch touch = Input.GetTouch(i);


and that made the GC Allocs go away.



unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dUIManager.Update() GC Allocs
« Reply #1 on: April 06, 2015, 01:22:42 pm »
Thanks for that, fixed it for the next release