« on: 26 January 2017, 10:40:37 »
just a question,
will removeAllWidgets free all memory allocated for the widgets?



  • *****
  • 1365
    • View Profile
    • Texus's Blog
Re: RemoveAllWidget
« Reply #1 on: 26 January 2017, 12:34:05 »
Widgets are stored in shared pointers which will be destroyed as soon as nobody holds a pointer to the widget anymore. So if you still have a pointer in your own code then it will continue to exist, but if you have no pointer to it then after removeAllWidgets the gui shouldn't have a pointer to it anymore either so they should be destroyed and the memory freed.