Have you tried dbgSampleList.SelectedRows.delete? does it causes mem leaks too?
No, this does not cause mem leak. Thank you for your advice.
SelectedRows.Delete does a countdown instead of a for 0 to count - 1 (which you are doing)
for i := FList.Count-1 downto 0 do begin
Normally this shouldn't matter because doing a delete directly in an event doesn't effect the buffered dataset.
BUT... you have some procedures which interact with the dataset during deletion.
Namely the DataAccess.DeleteARecord (I'm not sure what going on in that procedure).
But if the dataset is updated INSIDE the event, then the for 0 to count -1 becomes very problematic.
You delete item 0 and everything is shifted one up.
The you delete item 1 (while item 0 is still not deleted).
You end up trying to delete non existing items !!
So... either also do a countdown like "for i := FList.Count-1 downto 0 do begin"
or do a while FList.Count > 0 delete item 0.