mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 17:47:58 +02:00
Use TFPList.FreeAndNilDisposing in four more places.
This commit is contained in:
parent
183a10b292
commit
bff561063f
@ -1103,14 +1103,10 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
class procedure tnodeutils.release_init_final_list(list:tfplist);
|
class procedure tnodeutils.release_init_final_list(list:tfplist);
|
||||||
var
|
|
||||||
i : longint;
|
|
||||||
begin
|
begin
|
||||||
if not assigned(list) then
|
if not assigned(list) then
|
||||||
internalerror(2017051901);
|
internalerror(2017051901);
|
||||||
for i:=0 to list.count-1 do
|
TFPList.FreeAndNilDisposing(list,typeinfo(tinitfinalentry));
|
||||||
dispose(pinitfinalentry(list[i]));
|
|
||||||
list.free;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1974,12 +1974,8 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
destructor tgenericconstraintdata.destroy;
|
destructor tgenericconstraintdata.destroy;
|
||||||
var
|
|
||||||
i : longint;
|
|
||||||
begin
|
begin
|
||||||
for i:=0 to interfacesderef.count-1 do
|
TFPList.FreeAndNilDisposing(interfacesderef,typeinfo(tderef));
|
||||||
dispose(pderef(interfacesderef[i]));
|
|
||||||
interfacesderef.free;
|
|
||||||
interfaces.free;
|
interfaces.free;
|
||||||
inherited destroy;
|
inherited destroy;
|
||||||
end;
|
end;
|
||||||
@ -2103,8 +2099,6 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
destructor tstoreddef.destroy;
|
destructor tstoreddef.destroy;
|
||||||
var
|
|
||||||
i : longint;
|
|
||||||
begin
|
begin
|
||||||
{ Direct calls are not allowed, use symtable.deletedef() }
|
{ Direct calls are not allowed, use symtable.deletedef() }
|
||||||
if assigned(owner) then
|
if assigned(owner) then
|
||||||
@ -2116,10 +2110,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
rtti_attribute_list.free;
|
rtti_attribute_list.free;
|
||||||
genericparas.free;
|
genericparas.free;
|
||||||
if assigned(genericparaderefs) then
|
TFPList.FreeAndNilDisposing(genericparaderefs,typeinfo(tderef));
|
||||||
for i:=0 to genericparaderefs.count-1 do
|
|
||||||
dispose(pderef(genericparaderefs[i]));
|
|
||||||
genericparaderefs.free;
|
|
||||||
genconstraintdata.free;
|
genconstraintdata.free;
|
||||||
{$ifndef symansistr}
|
{$ifndef symansistr}
|
||||||
stringdispose(_fullownerhierarchyname);
|
stringdispose(_fullownerhierarchyname);
|
||||||
@ -6797,19 +6788,11 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
procedure tprocdef.freeimplprocdefinfo;
|
procedure tprocdef.freeimplprocdefinfo;
|
||||||
var
|
|
||||||
i : longint;
|
|
||||||
begin
|
begin
|
||||||
if assigned(implprocdefinfo) then
|
if assigned(implprocdefinfo) then
|
||||||
begin
|
begin
|
||||||
stringdispose(implprocdefinfo^.resultname);
|
stringdispose(implprocdefinfo^.resultname);
|
||||||
if assigned(implprocdefinfo^.capturedsyms) then
|
TFPList.FreeAndNilDisposing(implprocdefinfo^.capturedsyms,typeinfo(tcapturedsyminfo));
|
||||||
begin
|
|
||||||
for i:=0 to implprocdefinfo^.capturedsyms.count-1 do
|
|
||||||
dispose(pcapturedsyminfo(implprocdefinfo^.capturedsyms[i]));
|
|
||||||
end;
|
|
||||||
implprocdefinfo^.capturedsyms.free;
|
|
||||||
implprocdefinfo^.capturedsyms:=nil;
|
|
||||||
freemem(implprocdefinfo);
|
freemem(implprocdefinfo);
|
||||||
implprocdefinfo:=nil;
|
implprocdefinfo:=nil;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user