Browse Source

* fix tasmlisttypedconstbuilder memory leaks

git-svn-id: trunk@30851 -
Jonas Maebe 10 years ago
parent
commit
9ceddf9b16
1 changed files with 9 additions and 0 deletions
  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;