浏览代码

* fix tasmlisttypedconstbuilder memory leaks

git-svn-id: trunk@30851 -
Jonas Maebe 10 年之前
父节点
当前提交
9ceddf9b16
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      compiler/ngtcon.pas

+ 9 - 0
compiler/ngtcon.pas

@@ -100,6 +100,7 @@ interface
         procedure tc_emit_stringdef(def: tstringdef; var node: tnode);override;
         procedure tc_emit_stringdef(def: tstringdef; var node: tnode);override;
        public
        public
         constructor create(sym: tstaticvarsym);virtual;
         constructor create(sym: tstaticvarsym);virtual;
+        destructor Destroy; override;
         procedure parse_into_asmlist;
         procedure parse_into_asmlist;
         { the asmlist containing the definition of the parsed entity and another
         { the asmlist containing the definition of the parsed entity and another
           one containing the data generated for that same entity (e.g. the
           one containing the data generated for that same entity (e.g. the
@@ -448,6 +449,14 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
       end;
       end;
 
 
 
 
+    destructor tasmlisttypedconstbuilder.Destroy;
+      begin
+        fdatalist.free;
+        ftcb.free;
+        inherited Destroy;
+      end;
+
+
     procedure tasmlisttypedconstbuilder.tc_emit_stringdef(def: tstringdef; var node: tnode);
     procedure tasmlisttypedconstbuilder.tc_emit_stringdef(def: tstringdef; var node: tnode);
       var
       var
         strlength : aint;
         strlength : aint;