Environ
ide: Lazarus-0.9.20 beta
Compiler: freepascal 2.0.4
DBO: 6.6.0 beta
if i execute the following code, the amount of memory required by the process grows ever
procedure TForm1.Button1Click(Sender: TObject);
var
q: tzquery;
begin
while true do
begin
q:=TZQuery.Create(nil);
q.Connection:=ZConnection1;
q.SQL.Text:='select codiarti,descarti from articoli where codiarti = ''25''';
q.open;
sleep(1);
application.ProcessMessages;
q.Close;
q.free;
end;
end;
the memory doesn't grow if i change the query executed this way
q.SQL.Text:='select codiarti from articoli where codiarti = ''25''';
I extract one field instead of two or more.
Can it be a bug?
Thank's in advance for any answare.
[bug_report] PostgreSQL memory leaks
Moderators: EgonHugeist, mdaems
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi,
This problem MAY BE solved in current SVN Trunk version since november 11.
There was a problem cleaning column info when more than 1 column was selected.
Check if your version contains this code :
Mark Daems
BTW, please answer if this solves your problem.
This problem MAY BE solved in current SVN Trunk version since november 11.
There was a problem cleaning column info when more than 1 column was selected.
Check if your version contains this code :
Code: Select all
procedure TZAbstractResultSet.Close;
var I : integer;
var FColumnInfo : TZColumnInfo;
begin
LastWasNull := True;
FRowNo := 0;
FLastRowNo := 0;
FClosed := True;
for I := FColumnsInfo.Count-1 downto 0 do begin
FColumnInfo:=TZColumnInfo(FColumnsInfo.Extract(FColumnsInfo.Items[I]));
FColumnInfo.Free;
end;
FColumnsInfo.Clear;
FStatement := nil;
end;
BTW, please answer if this solves your problem.