You are not logged in.
ISQLDBRows always causes memory leaks in lazarus(fpc3.2.2)
When executed
The ReleaseRows method and then set it to nil
Offline
I am not able to reproduce it.
Create a gist with a minimal reproducible sample of this.
Ensure you read and follow https://synopse.info/files/html/Synopse … l#TITL_195 advices.
Offline
this is my code :
var
stmt: ISQLDBRows;
oledbP: TOleDBMSSQLConnectionProperties;
begin
oledbP := TOleDBMSSQLConnectionProperties.Create(oleServer, oleDB, oleUser, olePwd);
try
stmt := oledbP.Execute('select * from test ', []);
while stmt.Step do
begin
//do something
end;
finally
stmt.ReleaseRows;
stmt := nil; -------> call memory leaks (Use Heaptrc Unit check for mem-leaks)(-gh)
oledbP.Free;
end;
end;
lazarus --2.2.0
fpc --3.2.2
Last edited by zhangguichao (2023-06-08 07:36:34)
Offline
I'll look into the compiler again, and thank you.
Offline