Pandora
asked on
A Question about linking objects to ListView Items in Delphi
My question is
If I use the following code:
And then later on access it using something like
TMyObject(ListView1.Items. item[a].da ta)
will that point to  MyObject or will it refer to a copy of MyObject; In Other words,
does the data stored in the listview point to the original MyObject
If I use the following code:
Var
MyObject:TMyObject; //Global Variable
begin
ListView1.Items.add;
ListView1.Items.item[a].data:=MyObject;
...
end;
And then later on access it using something like
TMyObject(ListView1.Items.
will that point to  MyObject or will it refer to a copy of MyObject; In Other words,
does the data stored in the listview point to the original MyObject
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Clearing listview will not release objects. You can do this on listviews OnDeletition event
ASKER
Thanks!