I doubt you get into memory problems unless you want to add thousands of widgets.
You can create a central widget (like in the main window) and set it to the corresponding widget. Unused widgets can then be deleted. Care should be given to prevent data corruption though.
Bookmarks