Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

Release frame from listview click

$
0
0

Using Delphi 10 Seatlle FMX.

I've made a frame with a listview. On clicking a listview item, I want to close (free) the frame.

See code below. The frame gets hidden, however the frame is not freed (it stays <> nil) and more unexpected: the Released property is False.

Do I have to fear a memory leak, or how do I properly release a frame from a ListViewItemClick event?

procedure TMyFrame.MyListViewItemClick(const Sender: TObject; const ListViewItem: TListViewItem);

begin

  // do callback

  Release;

end;




Viewing all articles
Browse latest Browse all 3212

Trending Articles