Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TreeCtrl » A [TreeCtrl] bug
A [TreeCtrl] bug [message #14549] Mon, 03 March 2008 07:56 Go to previous message
huanghuan is currently offline  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;
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FIX - Single Click does not open/close items
Next Topic: problem in Refreshing at end of tree
Goto Forum:
  


Current Time: Sun Apr 28 00:15:04 CEST 2024

Total time taken to generate the page: 0.04460 seconds