Help cleaning the memory by removing some references after the widgets is detached from its window