I am working on a mobile game that is entirely UI based and involves recreating the same widget multiple times.
The game was working fine on my computer, but then I was surprised to find that it was slow and lagging on my phone, and, due to the multiple delay nodes, the entire game breaks because the game was relying on that consistent speed.
Going back into the editor, I found the count of my class, that starts off at around 40, ends up at 4,000! The memory leak caused by this is very substantial, especially on mobile. I am using Remove from Parent, but, as we all know, this doesn’t actually destroy the widget.
I can’t imagine why this isn’t already built into the game, but now I’m going to have to create a weird work around of recycling the old widgets, instead of just removing them. This is a huge step backwards and means having to rethink the whole project.