RemoveAllWidget

Started by roccio, 26 January 2017, 10:40:37

roccio

Hello,
just a question,
will removeAllWidgets free all memory allocated for the widgets?

texus

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.