HI Jason,
Your object that you have created, is your responsibility to free, unless it is a descendant of TComponent, and you have assigned an owner to it, in which case it will be destroyed when the owner is destroyed.
There is an event for the Treeview called onDeletion. This fires when any node on the Treeview is deleted. Use this to free your object. You can then just call Treeview1.clear, and have all nodes, and any data associated with the nodes removed.
You may also look at deriving your object from TInterfacedObject, and have automatic garbage collection of the object when it goes out of scope ... but that's another topic.
regards
Gary
At 08:19 on 15/12/2003 you wrote
>To : [EMAIL PROTECTED]
>CC :
>From: Jason Coley, [EMAIL PROTECTED]
>Content Type: text/html
>Attached:
>
>_______________________________________________
>Delphi mailing list
>[EMAIL PROTECTED]
>http://ns3.123.co.nz/mailman/listinfo/delphi
>
========================================================
Gary Benner - e-Engineer and Software Developer - [EMAIL PROTECTED]
123 Internet Ltd
Lecturer in Information Technology - Waiariki Institute of Technology
Ref#: 41006
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi
