-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification please regarding OnFreeNode handling for strings etc #1219
Comments
Simply turn on |
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. |
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.
The text was updated successfully, but these errors were encountered: