mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 01:01:33 +02:00
* Call free instead of destroy
This commit is contained in:
parent
36e65b3464
commit
d3a0a2dddf
@ -4954,7 +4954,7 @@ const
|
||||
if factval<>nil then
|
||||
begin
|
||||
track_state_pass:=true;
|
||||
left.destroy;
|
||||
left.free;
|
||||
left:=factval.getcopy;
|
||||
end;
|
||||
if right.track_state_pass(exec_known) then
|
||||
@ -4967,7 +4967,7 @@ const
|
||||
if factval<>nil then
|
||||
begin
|
||||
track_state_pass:=true;
|
||||
right.destroy;
|
||||
right.free;
|
||||
right:=factval.getcopy;
|
||||
end;
|
||||
end;
|
||||
|
@ -5103,7 +5103,7 @@ implementation
|
||||
if value<>nil then
|
||||
begin
|
||||
track_state_pass:=true;
|
||||
hp.left.destroy;
|
||||
hp.left.free;
|
||||
hp.left:=value.getcopy;
|
||||
do_typecheckpass(hp.left);
|
||||
end;
|
||||
|
@ -1300,7 +1300,7 @@ implementation
|
||||
t:=Tunarynode(left);
|
||||
left:=Tunarynode(left).left;
|
||||
t.left:=nil;
|
||||
t.destroy;
|
||||
t.free;
|
||||
{Symdif operator, in case you are wondering:}
|
||||
loopflags:=loopflags >< [lnf_checknegate];
|
||||
end;
|
||||
@ -1486,7 +1486,7 @@ implementation
|
||||
code:=right.getcopy;
|
||||
if code.track_state_pass(exec_known) then
|
||||
track_state_pass:=true;
|
||||
code.destroy;
|
||||
code.free;
|
||||
end;
|
||||
repeat
|
||||
condition:=left.getcopy;
|
||||
@ -1495,7 +1495,7 @@ implementation
|
||||
factval:=aktstate.find_fact(left);
|
||||
if factval<>nil then
|
||||
begin
|
||||
condition.destroy;
|
||||
condition.free;
|
||||
condition:=factval.getcopy;
|
||||
change:=true;
|
||||
end;
|
||||
@ -1526,8 +1526,8 @@ implementation
|
||||
code.track_state_pass(false);
|
||||
done:=true;
|
||||
end;
|
||||
code.destroy;
|
||||
condition.destroy;
|
||||
code.free;
|
||||
condition.free;
|
||||
firsttest:=false;
|
||||
until done;
|
||||
{The loop condition is also known, for example:
|
||||
@ -1550,7 +1550,7 @@ implementation
|
||||
aktstate.store_fact(condition,
|
||||
cordconstnode.create(byte(checknegate),pasbool1type,true))
|
||||
else
|
||||
condition.destroy;
|
||||
condition.free;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
@ -1820,8 +1820,7 @@ implementation
|
||||
|
||||
destructor tfornode.destroy;
|
||||
begin
|
||||
if assigned(loopiteration) then
|
||||
loopiteration.destroy;
|
||||
loopiteration.free;
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
|
@ -387,10 +387,10 @@ implementation
|
||||
end;
|
||||
until false;
|
||||
{ free scanner }
|
||||
current_scanner.destroy;
|
||||
current_scanner.free;
|
||||
set_current_scanner(nil);
|
||||
{ close }
|
||||
preprocfile.destroy;
|
||||
preprocfile.free;
|
||||
end;
|
||||
{$endif PREPROCWRITE}
|
||||
|
||||
|
@ -245,7 +245,7 @@ implementation
|
||||
begin
|
||||
aktstate:=Tstate_storage.create;
|
||||
p.track_state_pass(true);
|
||||
aktstate.destroy;
|
||||
aktstate.free;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
|
@ -423,7 +423,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
Message(parser_e_class_id_expected);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
statement_syssym:=cerrornode.create;
|
||||
end;
|
||||
end;
|
||||
@ -481,7 +481,7 @@ implementation
|
||||
if df_has_generic_fields in p1.resultdef.defoptions then
|
||||
include(statement_syssym.flags,nf_generic_para);
|
||||
{ p1 not needed !}
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -514,7 +514,7 @@ implementation
|
||||
end;
|
||||
{ else
|
||||
begin
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
Message(parser_e_illegal_parameter_list);
|
||||
end;}
|
||||
@ -902,7 +902,7 @@ implementation
|
||||
good, so ignore it.}
|
||||
in_args:=true;
|
||||
p1:=comp_expr([ef_accept_equal]);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
consume(_RKLAMMER);
|
||||
end;
|
||||
statement_syssym:=geninlinenode(l,false,nil);
|
||||
@ -2280,7 +2280,7 @@ implementation
|
||||
again:=false;
|
||||
Message(parser_e_invalid_qualifier);
|
||||
recoverconsume_postfixops;
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
end
|
||||
else
|
||||
@ -2309,7 +2309,7 @@ implementation
|
||||
protsym:=search_default_property(tabstractrecorddef(p1.resultdef));
|
||||
if not(assigned(protsym)) then
|
||||
begin
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
again:=false;
|
||||
message(parser_e_no_default_property_available);
|
||||
@ -2420,7 +2420,7 @@ implementation
|
||||
begin
|
||||
if p1.resultdef.typ<>undefineddef then
|
||||
Message(parser_e_invalid_qualifier);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
comp_expr([ef_accept_equal]);
|
||||
again:=false;
|
||||
@ -2640,7 +2640,7 @@ implementation
|
||||
srsym:=tsym(tenumdef(p1.resultdef).symtable.Find(pattern));
|
||||
if assigned(srsym) and (srsym.typ=enumsym) and (p1.nodetype=typen) then
|
||||
begin
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
check_hints(srsym,srsym.symoptions,srsym.deprecatedmsg);
|
||||
p1:=genenumnode(tenumsym(srsym));
|
||||
consume(_ID);
|
||||
@ -2648,7 +2648,7 @@ implementation
|
||||
else
|
||||
if not try_type_helper(p1,nil) then
|
||||
begin
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
Message1(sym_e_id_no_member,orgpattern);
|
||||
p1:=cerrornode.create;
|
||||
consume(_ID);
|
||||
@ -2656,7 +2656,7 @@ implementation
|
||||
end
|
||||
else
|
||||
begin
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
consume(_ID);
|
||||
end
|
||||
@ -2675,13 +2675,13 @@ implementation
|
||||
begin
|
||||
consume(_ID);
|
||||
p2:=parse_array_constructor(tarraydef(p1.resultdef));
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=p2;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Message2(scan_f_syn_expected,'CREATE',pattern);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
consume(_ID);
|
||||
end;
|
||||
@ -2689,7 +2689,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
Message(parser_e_invalid_qualifier);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
consume(_ID);
|
||||
end;
|
||||
@ -2698,7 +2698,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
Message(parser_e_invalid_qualifier);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
consume(_ID);
|
||||
end;
|
||||
@ -2707,7 +2707,7 @@ implementation
|
||||
if (token<>_ID) or not try_type_helper(p1,nil) then
|
||||
begin
|
||||
Message(parser_e_invalid_qualifier);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
consume(_ID);
|
||||
end;
|
||||
@ -2911,7 +2911,7 @@ implementation
|
||||
if found then
|
||||
begin
|
||||
tderefnode(p1).left:=nil;
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=p2;
|
||||
end;
|
||||
end
|
||||
@ -2921,7 +2921,7 @@ implementation
|
||||
begin
|
||||
if p1.resultdef.typ<>undefineddef then
|
||||
Message(parser_e_invalid_qualifier);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
{ Error }
|
||||
consume(_ID);
|
||||
|
@ -451,7 +451,7 @@ implementation
|
||||
Message(type_e_type_id_expected);
|
||||
consume_all_until(_RKLAMMER);
|
||||
consume(_RKLAMMER);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
new_function:=cerrornode.create;
|
||||
exit;
|
||||
end;
|
||||
@ -461,7 +461,7 @@ implementation
|
||||
Message1(type_e_pointer_type_expected,p1.resultdef.typename);
|
||||
consume_all_until(_RKLAMMER);
|
||||
consume(_RKLAMMER);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
new_function:=cerrornode.create;
|
||||
exit;
|
||||
end;
|
||||
@ -485,7 +485,7 @@ implementation
|
||||
Message(parser_e_pointer_to_class_expected);
|
||||
consume_all_until(_RKLAMMER);
|
||||
consume(_RKLAMMER);
|
||||
p1.destroy;
|
||||
p1.free;
|
||||
new_function:=cerrornode.create;
|
||||
exit;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user