* fixed some memory leaks

This commit is contained in:
Jonas Maebe 2001-03-13 11:52:48 +00:00
parent 9316147a24
commit fe7eb08eef

View File

@ -587,7 +587,10 @@ implementation
procedureprefix:='FPC_'+pstringdef(hp.resulttype)^.stringtypname+'_'; procedureprefix:='FPC_'+pstringdef(hp.resulttype)^.stringtypname+'_';
tcallparanode(hp).secondcallparan(dummycoll,false,false,false,0,0); tcallparanode(hp).secondcallparan(dummycoll,false,false,false,0,0);
if codegenerror then if codegenerror then
exit; begin
dummycoll.free;
exit;
end;
dummycoll.paratyp:=vs_const; dummycoll.paratyp:=vs_const;
left.free; left.free;
@ -609,7 +612,10 @@ implementation
dummycoll.paratyp:=vs_value; dummycoll.paratyp:=vs_value;
tcallparanode(hp).secondcallparan(dummycoll,false,false,false,0,0); tcallparanode(hp).secondcallparan(dummycoll,false,false,false,0,0);
if codegenerror then if codegenerror then
exit; begin
dummycoll.free;
exit;
end;
hp.free; hp.free;
hp:=node; hp:=node;
node:=tcallparanode(node.right); node:=tcallparanode(node.right);
@ -626,7 +632,10 @@ implementation
dummycoll.paratyp:=vs_value; dummycoll.paratyp:=vs_value;
tcallparanode(hp).secondcallparan(dummycoll,false,false,false,0,0); tcallparanode(hp).secondcallparan(dummycoll,false,false,false,0,0);
if codegenerror then if codegenerror then
exit; begin
dummycoll.free;
exit;
end;
hp.free; hp.free;
hp:=node; hp:=node;
node:=tcallparanode(node.right); node:=tcallparanode(node.right);
@ -650,7 +659,10 @@ implementation
dummycoll.paratyp:=vs_value; dummycoll.paratyp:=vs_value;
tcallparanode(hp).secondcallparan(dummycoll,false,false,false,0,0); tcallparanode(hp).secondcallparan(dummycoll,false,false,false,0,0);
if codegenerror then if codegenerror then
exit; begin
dummycoll.free;
exit;
end;
saveregvars($ff); saveregvars($ff);
if is_real then if is_real then
@ -670,7 +682,7 @@ implementation
emitcall(procedureprefix+'LONGINT'); emitcall(procedureprefix+'LONGINT');
end; end;
hp.free; hp.free;
dummycoll.free;
popusedregisters(pushed); popusedregisters(pushed);
end; end;
@ -722,7 +734,10 @@ implementation
dummycoll.paratype.setdef(dest_para.resulttype); dummycoll.paratype.setdef(dest_para.resulttype);
dest_para.secondcallparan(dummycoll,false,false,false,0,0); dest_para.secondcallparan(dummycoll,false,false,false,0,0);
if codegenerror then if codegenerror then
begin
dummycoll.free;
exit; exit;
end;
{save the regvars} {save the regvars}
pushusedregisters(pushed,$ff); pushusedregisters(pushed,$ff);
@ -736,7 +751,10 @@ implementation
dummycoll.paratype.setdef(code_para.resulttype); dummycoll.paratype.setdef(code_para.resulttype);
code_para.secondcallparan(dummycoll,false,false,false,0,0); code_para.secondcallparan(dummycoll,false,false,false,0,0);
if codegenerror then if codegenerror then
exit; begin
dummycoll.free;
exit;
end;
code_para.free; code_para.free;
End End
Else Else
@ -751,7 +769,10 @@ implementation
dummycoll.paratype.setdef(node.resulttype); dummycoll.paratype.setdef(node.resulttype);
node.secondcallparan(dummycoll,false,false,false,0,0); node.secondcallparan(dummycoll,false,false,false,0,0);
if codegenerror then if codegenerror then
exit; begin
dummycoll.free;
exit;
end;
Case dest_para.resulttype^.deftype of Case dest_para.resulttype^.deftype of
floatdef: floatdef:
@ -902,6 +923,7 @@ implementation
End; End;
{dest_para.right is already nil} {dest_para.right is already nil}
dest_para.free; dest_para.free;
dummycoll.free;
UnGetIfTemp(hr); UnGetIfTemp(hr);
end; end;
@ -1682,7 +1704,10 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.11 2000-12-25 00:07:33 peter Revision 1.12 2001-03-13 11:52:48 jonas
* fixed some memory leaks
Revision 1.11 2000/12/25 00:07:33 peter
+ new tlinkedlist class (merge of old tstringqueue,tcontainer and + new tlinkedlist class (merge of old tstringqueue,tcontainer and
tlinkedlist objects) tlinkedlist objects)