Link to home
Start Free TrialLog in
Avatar of Pandora
PandoraFlag for United Kingdom of Great Britain and Northern Ireland

asked on

A Question about linking objects to ListView Items in Delphi

My question is

If I use the following code:

Var
MyObject:TMyObject;  //Global Variable
 
begin

ListView1.Items.add;
ListView1.Items.item[a].data:=MyObject;
 ...
end;

Open in new window


And then later on access it using something like

TMyObject(ListView1.Items.item[a].data)

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
Avatar of developmentguru
developmentguru
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sinisa Vuk
Clearing listview will not release objects. You can do this on listviews OnDeletition event
Avatar of Pandora

ASKER

Thanks!