Code: Select all
ReportMemoryLeaksOnShutDown := true;The leak message is:

I tried to prevent the code breaking up by catching exceptions, but this didn't help:
Code: Select all
....
Query.SQL.Clear;
Query.SQL.Add(Sql);
try
Query.Connection.Connect;
Query.Execute;
except
on e: Exception do
LogToFile(e.Message);
end;
....