work with PostgreSQL memleak on server after 3936
Posted: 24.10.2016, 10:44
if TransactIsolationLevel:=tiNone;
mem leak on server
in this code:
procedure StartTransactionSupport never called - server recourses not deallocated
mem leak on server
in this code:
Code: Select all
procedure TZPostgreSQLConnection.StartTransactionSupport;
..
if Assigned(FUnpreparableStmts) then begin
for x := FUnpreparableStmts.Count - 1 downto 0 do begin
SQL := 'DEALLOCATE "' + {$IFDEF UNICODE}UnicodeStringToASCII7{$ENDIF}(FUnpreparableStmts.Strings[x]) + '";';;
QueryHandle := GetPlainDriver.ExecuteQuery(FHandle, Pointer(SQL));
CheckPostgreSQLError(nil, GetPlainDriver, FHandle, lcExecute, SQL,QueryHandle);
GetPlainDriver.PQclear(QueryHandle);
DriverManager.LogMessage(lcExecute, ConSettings^.Protocol, SQL);
FUnpreparableStmts.Delete(x);
end;
end;
...