I need to use a class instead of record for VirtualStringTree node.
Should I declare it standard (but in this case - tricky) way like that:
PNode = ^TNode;
TNode = record
obj: TMyObject;
end;
//..
var
fNd: PNode;
begin
fNd:= vstTree.getNodeData(vstTree.AddChild(nil));
fNd.obj:= TMyObject.Create;
//..
or should I use directly TMyObject
? If so - how?!
How about assigning (constructing) the object and freeing it?
Thanks in advance m.