* 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); attribute:=trtti_attribute(pd.skpara);
load := cloadnode.create(pd.funcretsym,pd.funcretsym.Owner); load := cloadnode.create(pd.funcretsym,pd.funcretsym.Owner);
assignment := cassignmentnode.create(load,Attribute.constructorcall); assignment := cassignmentnode.create(load,Attribute.constructorcall.getcopy);
assignment.resultdef := voidtype; assignment.resultdef := voidtype;
statement := cstatementnode.Create(assignment,nil); statement := cstatementnode.Create(assignment,nil);

View File

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