TGUI Forum

General Category => Help requests => Topic started by: roccio on 26 January 2017, 10:40:37

Title: RemoveAllWidget
Post by: roccio on 26 January 2017, 10:40:37
Hello,
just a question,
will removeAllWidgets free all memory allocated for the widgets?
Title: Re: RemoveAllWidget
Post by: texus 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.