Spawn actor w/ widget component.
Destroy actor.
Widget tick ends.
Widget still prints key events, variables still accessible, and prints reference to self. Shouldn’t it no longer exist?
And, every time actor is spawned, an additional widget now prints. Press a key and get something akin to:
W_Widget_0
W_Widget_1
W_Widget_2
W_Widget_3 and so on…
I’ve tried directly destroying the component or removing component’s widget but it seems indestructible.
Possibly related to:
UPDATE:
I found the widget(s) are no longer accessible (e.g. GetAllWidgetsOfClass) after about 30-50 seconds, and if there are multiple they all disappear at the same time as if part of a garbage flush.
The above mentioned “prints key events” is where I’ve added EnhancedInput events to the widget which may be a bit odd. I was surprised they could be added. But, they continue working after the widget is supposedly destroyed, and stop when finally “flushed”.
I find it odd behavior but seems at least there won’t be a buildup of 100 widgets in memory by the end of a match which was the big concern.