[SOLVED] VirtualStringTree FreeNode lazarus / 31-LCL ---------------------------------------------------------------------- Pe3s · 2022-07-16 06:58 Hello I have a question regarding FreeNode In the VirtualStringTree documentation there is such a code Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.VSTFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);var  Data: PData;begin  Data := VST.GetNodeData(Node);    Data^.Imie := '';    Data^.Nazwisko := '';    Data^.Telefon := '';end; Wouldn't it be better to replace it with such a code Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.VSTFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);var  Data: PData;begin  Data := Sender.GetNodeData(Node);  Finalize(Data^);end; ---------------------------------------------------------------------- jamie · 2022-07-16 13:14 If you didn't use managed types you wouldn't need to worry about that. ---------------------------------------------------------------------- Pe3s · 2022-07-17 17:57