Freeing gadgets question
BlitzMax Forums/MaxGUI Module/Freeing gadgets question| 
 | ||
| If I FreeGadget() on a window, does that properly free all the gadgets attached to the window as well? or do I have to manually free every gadget individually? | 
| 
 | ||
| As there are no other answers yet: I would think that the garbage collector should free every gadget attached to a window by itself. | 
| 
 | ||
| That was my theory, either that or the window should free it's children when it's freed. But I can't find an official note anywhere. | 
| 
 | ||
| yea. from gadget cleanup code: For Local tmpChild:TGadget = EachIn kids.Copy() tmpChild.CleanUp() Next so all kids are deleted when freegadget | 
| 
 | ||
| aah, thank you for verification! | 
| 
 | ||
|  If I FreeGadget() on a window, does that properly free all the gadgets attached to the window as well?  Yep - so be careful of dangling pointers. |