About Terminal Server, Citrix, Delphi and other stuff
Again a about post about using the Virtual TreeView component (did I mention it’s brilliant?), this time I will talk about memory leaks.
I often use Records to hold the treedata, and usually the record holds some string data (eg a caption) and an (a reference to) an Interface or Object(List) that holds more data.
If you are familiar with Virtual Tree then you know that you must can the NodeData in the OnFreeNode event.
Let’s look at an example:
TTreeData = record
PTreeData = ^TTreeData;
procedure TMainForm.TreeViewFreeNode(Sender: TBaseVirtualTree;
TreeData := Sender.GetNodeData(Node);
Looks allright doesn’t it? And still if you test for memoryleaks with Eurekalog or FastMM you will sometimes notice some leaks.
This happens because Virtual Treeview only calls the OnNodeFree event for Validated Nodes and a node that was never “touched” (eg the node was never visible and thus the GetText event was never called) was never validated.
In these cases you can manually validate the node when adding it
.NET .NET FrameWork Active Directory Altiris Automation Manager bug Citrix Dell Delphi Excel Exchange Exchange2003 Exchange2010 Hack HP iOS Java LinkedIn Linux Lync MSI Office Office 2010 Outlook Passat Password PowerPoint PowerShell RES RNS510 SasLibEx Security Terminal Server ThinApp TSAdminEx Unattended VBS VCDS Vista Visual Basic VMWare Volkswagen Windows PE Wordpress XenApp