"Set timer by event" prevents widget from being destroyed
If I use looping "Set Timer by Event" in a widget blueprint then remove that widget from parent, it never gets destroyed. After creating and removing this kind of widget from parent hundreds of times causes significant fps decrease. Because there are hundreds of instance of that widget and they don't get destroyed.
Expected: Widget should be destroyed after it is not being called by another actor for a period.
Result: It is never being destroyed and never stops working so it is causing low fps on mobile devices if there is an expensive operations in the timers custom event.
--Here is longer version of this bug report:--
I have a widget with a looping timer. Every 5 seconds, it is refreshing it's content which is a little bit slow operation. But, even if I remove this widget from parent, this timer never stops. If a create this widget 100 times and remove all of them from parent, they continue to working and in mobile device fps extremely decreases.
Expected: No significant performance decrease
Result: Fps is around 10
After reading over your post, this appears to be working as intended. Removing a widget does not signal the death of it. It's garbage collected like any other UObject. This means that it remains in memory until garbage collected. I have provided a link to a similar issue. You will see that it was closed as won't fix. I hope that this information helps.
Make it a great day
answered Nov 28 '16 at 07:01 PM
Rudy Q ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here