Does FreeGadget remove that gadget AND children?

BlitzMax Forums/MaxGUI Module/Does FreeGadget remove that gadget AND children?

Chapman7(Posted 2013) [#1]
If I made a window with some gadgets, and FreeGadget(ed) the window, would the gadgets that are parented to the window be removed also or do I have to remove those first?


Henri(Posted 2013) [#2]
Hello,

for example FreeGadget(my_window:tgadget) removes my_window, and all gadgets that have my_window as a parent. my_window would still hold a value (memory address), but if you'd try to use it there would be an error.
So you only need to free the parent.

-Henri


Chapman7(Posted 2013) [#3]
Gotcha, thanks Henri!