소스 검색

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

git-svn-id: trunk@42388 -
svenbarth 6 년 전
부모
커밋
f9cda608fa
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      compiler/symcreat.pas
  2. 1 0
      compiler/symdef.pas

+ 1 - 1
compiler/symcreat.pas

@@ -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);

+ 1 - 0
compiler/symdef.pas

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