How to reset the values of the variables in an Editor Utility Widget once its closed or on opening it

Oh, I got the problem, somehow the widget is not destructing properly on close, so every time i open it a new one is created but the previous ones stay in memory, I will have to check my cpp code on how to properly destroy the previous ones.

The only time the Editor Utility widget variable values seem to reset is on Editor restart, I just can’t seem to be able to reset the values anywhere. How would I reset the values on exit or open?

You can try to use On Added To Focus Path and On Removed from Focus Path