Home » U++ Library support » TreeCtrl » A [TreeCtrl] bug
A [TreeCtrl] bug [message #14549] |
Mon, 03 March 2008 07:56 |
huanghuan
Messages: 10 Registered: December 2007
|
Promising Member |
|
|
the function TreeCtrl::Find(Value) return a valid id after I remove the node.
I found the memory has managed by a Array<Item>. the remove function just push the node to the freelist by the field freelink.
So I think m.key=Null should be call in the remove function as following.
void TreeCtrl::RemoveSubtree(int id)
{
Item& m = item[id];
if(m.sel)
selectcount--;
if(m.linei == cursor)
cursor = item[m.parent].linei;
if(m.ctrl)
m.ctrl->Remove();
m.key=Null
m.value = Null;
m.image = Null;
RemoveChildren(id);
m.freelink = freelist;
freelist = id;
m.free = true;
}
|
|
|
Goto Forum:
Current Time: Sun Apr 28 00:15:04 CEST 2024
Total time taken to generate the page: 0.04460 seconds
|