Code Improvement - Shapes not being set to Nill

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
Artimus
Newbie
Newbie
Posts: 18
Joined: Fri Oct 22, 2004 4:00 am

Code Improvement - Shapes not being set to Nill

Post by Artimus » Thu Dec 11, 2008 5:28 pm

When the TCustomTree.Clear is called, it is only freeing the shape, and not setting them to nil.

Could you please include the following change in your next code release.
TeeTree.pas
- TCustomTree.Clear
// 9th line from the Procedure Decleration
//Previous Code
for t:=0 to Shapes.Count-1 do Shapes[t].Free;

//Change To
for t:=0 to Shapes.Count-1 do Shapes.FreeAndNillItem(t);


This will fix some problems I have been having when checking if a shape is assigned.

Post Reply