* take a copy of the constructor assignment node (and free it together with the attribute)

git-svn-id: trunk@42388 -
This commit is contained in:
svenbarth 2019-07-12 22:06:57 +00:00
parent d31dd4ac7b
commit f9cda608fa
2 changed files with 2 additions and 1 deletions

View File

@ -1034,7 +1034,7 @@ implementation
attribute:=trtti_attribute(pd.skpara);
load := cloadnode.create(pd.funcretsym,pd.funcretsym.Owner);
assignment := cassignmentnode.create(load,Attribute.constructorcall);
assignment := cassignmentnode.create(load,Attribute.constructorcall.getcopy);
assignment.resultdef := voidtype;
statement := cstatementnode.Create(assignment,nil);

View File

@ -2898,6 +2898,7 @@ implementation
var
n : tnode;
begin
constructorcall.free;
for n in paras do
n.free;
inherited destroy;