Closed gwideman closed 1 month ago
Simply turn on System.ReportMemoryLeaksOnShutdown:= true;
in Form OnCreate and check results with and without FreeMem
Please understand that we do not provide technical support for Virtual TreeView here. Please try to get support from the community e.g. at Stack Overflow , Delphi Pages or Delphi Praxis . Please do not use GitHub issues for getting support. If you feel you found a bug, please respect our guidelines on the project homepage for submitting bugs. Please include your version of Virtual TreeView and Delphi, and attach a sample compiling project as ZIP to your report, or instructions how to modify one of the included sample projects to reproduce the problem. If only small changes are required, a description is sufficient how a demo projects needs to be changed in order to replicate the bug. If you already have a solution, please supply a patch file.
The OnFreeNode event Help doc mentions: "You should however finalize the data in such a case if it contains references to external memory objects (e.g. variants, strings, interfaces)."
Could we get a more explicit description or example of how to handle this? Does it mean calling Finalize on each individual dynamically-allocated field? Or is it possible to call a single function (possibly Finalize), passing the entire data record?
I am not 100% sure from the Embarcadero doc how to do this. The example page "System InitializeFinalize (Delphi) shows:
For the TVirtualStringTree node data, I think we skip GetMem and Initialize, but in OnFreeNode we have to:
... and I think the FreeMem is unnecessary and should not be called.
Is all that right?
Thanks.