Subject | Re: FOutDa memory leak when Prepare fails |
---|---|
Author | |
Post date | 2017-05-18T17:43:35Z |
Making this modification to IB_Components.pas unit should resolve this issue.
Thanks,
procedure TIB_Statement.SysPrepareFailed( Sequence: integer );
begin
if ( not RepreparingSQL ) then
begin
FPrepared := false;
FParamCount := 0;
FParams.SysPrepareFailed;
FCursorFieldCount := 0;
FCursorFields.SysPrepareFailed;
end;
// Added this to tidy up memory allocations.
if ( not Prepared ) then
begin
FreeAndNilMem( FInDa );
FreeAndNilMem( FOutDa );
FInCnt := 0;
FOutCnt := 0;
end;
end;
Thanks,
Jason Wharton