EugeneK 19 Posted September 22, 2021 Hi TFDConnection has following method function ExecSQL(const ASQL: String; var AResultSet: TDataSet): LongInt; When using this do I need to free returned AResultSet? And if yes then if exception will be raised when opening query does it mean that there will be memory leak of TFDQuery object? Share this post Link to post
Lajos Juhász 293 Posted September 23, 2021 5 hours ago, EugeneK said: When using this do I need to free returned AResultSet? That's correct the ExecSQL will create the TFDQuery object without an owner and you've to free (no matter if there was an exception or not). 1 Share this post Link to post