TreeView Free Behaviour

BlitzMax Forums/MaxGUI Module/TreeView Free Behaviour

Brucey(Posted 2007) [#1]
Just interested in the general consensus as to what should happen when you want to FreeGadget() a TreeView.

Should you :

a) be freeing all the nodes by hand first?

or

b) have the TreeView free all its child nodes by itself?


:o)


Mark Tiffany(Posted 2007) [#2]
I think the IDE assumes a, and possibly in some manner relies on this behaviour. (Never really got my head round that area of code in the IDE, it's a beast).

But I'd expect b. Same as FreeGadget on a window frees all it's children. (In fact, presumably that's a memory leak waiting to happen right there...)


SebHoll(Posted 2007) [#3]
I'd say (B), freeing any other parent, should free its children too!


Brucey(Posted 2007) [#4]
I would wish for B too, but that's not what it currently does, unfortunately.

I just wonder if any apps would break if it suddenly was able to? (I would guess not likely, since as it stands you need to remove the kids first by hand anyway).


DavidDC(Posted 2007) [#5]
My vote is for B. I can't see how it would break anything.

- David