mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 17:39:25 +02:00
* in constructors, free the temp holding self only after loading the function
result, as self is the function result there (follow up to 40501) git-svn-id: trunk@40635 -
This commit is contained in:
parent
acf02ab64b
commit
c9a7afe053
@ -1818,9 +1818,11 @@ implementation
|
||||
begin
|
||||
{ can't free the result, because we load it after
|
||||
this call into the function result location
|
||||
(gets freed in thlcgobj.gen_load_return_value() }
|
||||
(gets freed in thlcgobj.gen_load_return_value();) }
|
||||
if (typ in [localvarsym,paravarsym]) and
|
||||
(([vo_is_funcret,vo_is_result]*varoptions)=[]) then
|
||||
(([vo_is_funcret,vo_is_result]*varoptions)=[]) and
|
||||
((current_procinfo.procdef.proctypeoption<>potype_constructor) or
|
||||
not(vo_is_self in varoptions)) then
|
||||
tg.Ungetlocal(list,localloc.reference);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user