When you close a WindowGadget. does everything else follow?

BlitzPlus Forums/BlitzPlus Programming/When you close a WindowGadget. does everything else follow?

Gabriel(Posted 2003) [#1]
I'm going to be opening and closing quite a few auxiliary windows, and I'm working on the assumption that freeing a WindowGadget will automatically free all the gadgets which belong to it. Is that assumption right?


CS_TBL(Posted 2003) [#2]
iirc, all gadgets in that window vapourise. Where else can they go.. flying around in thin air ? :)


Gabriel(Posted 2003) [#3]
lol, yeah I've noticed they vaporise. Just making sure I'm not causing a memory leak.


SJT(Posted 2003) [#4]
I asked this question on the beginners forum but no one answered.
It is important that you don't get memory leak if you are going to open and close windows frequently and if the children gadgets don't get memory freed this will happen.

Can any one confirm the situation?

Thanks.


Wiebo(Posted 2003) [#5]
It's best not to free your windows when closing them, and re-create the window and gadgets when re-opening. If you use HideGadget you can show them again later.


Kevin_(Posted 2003) [#6]
Spot on their Wiebo! That will also save you loads of memory too!

Regards


Snarty(Posted 2003) [#7]
Windows children and siblings are automatically freed by the Windows API when the parent is freed from memory, even if you attach non-blitz gadgets/children etc..