Remove window after add window?


I have a subwindow that will be showed (added to main window) when user clicks a button.

  1. Should I need to remove subwindow from mainwindow when user closes subwindow?
  2. Will it be a problem if I don’t remove subwindow?


If user closes the sub-window by clicking the close x in the window it will be removed by the framework. You wouldn’t want to leave unused windows to leave lying around (memory leak).