To ease comunication from the entire game with the UMG I’m doing all the widget manipulation through the HUD BP plus a widget that just “holds” the desired elements as childs, but there are not internal references on this One2RuleAll guy, I just get his Canvas borrowed and add childs created (and referenced) on the BP, I got this way a method to “eject” the unused widgets from the HUD by calling RemoveFromParent() from their “HUDhosted” variables.
OK, it’s working.
BUT… Some from these widgets are just what I called “one timers”, what means that after displayed to the player they’ll just appears again on most cases after a long, long time. I’ve called the RemoveFromParent, they get out from Screen but their references still “alive” for a very long time. (I did a test with the “?Is Valid” Node on the HUDTick).
To try to contour the situation I’m Setting these variables with none attached on then:
It’s working through the “?IsValid” test, but I would like to know if this is either “nulling” it or in really benefiting the Garbage Collector in some way by don’t keeping more any asset reference.
Thank you.