[SOLVED] TCustomDBGrid memory leak? lazarus / 31-LCL ---------------------------------------------------------------------- dsiders · 2019-01-18 21:40 Lazarus 1.8.4 I noticed that TCustomDBGrid does not free the TBookmarkList it uses for SelectedRows. It was created in the constructor though. Seems to violate the whole "clean up after yourself" principle for resource allocation. Seems like a memory leak to me. Checked the bugtracker, but did not find anything related. Comments? ---------------------------------------------------------------------- wp · 2019-01-18 21:47 Really? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i destructor TCustomDBGrid.Destroy;begin  {$ifdef dbgGrid}DebugLn('%s.Destroy', [ClassName]); {$endif}  FSelectedRows.Free;                 // <------------------------- Destroyed here !!!  FDataLink.OnDataSetChanged:=nil;  FDataLink.OnRecordChanged:=nil;  FDataLink.Free;  inherited Destroy;end; ---------------------------------------------------------------------- dsiders · 2019-01-18 21:52 Quote from: wp on January 18, 2019, 10:47:33 pmReally? That was a very polite way of pointing out that I am either blind or an idiot. My eyesight is pretty good, so let's go with the latter. Thanks. ---------------------------------------------------------------------- wp · 2019-01-18 22:14 Things like that happen to me all the time.