Jelajahi Sumber

* fix tasmlisttypedconstbuilder memory leaks

git-svn-id: trunk@30851 -
Jonas Maebe 10 tahun lalu
induk
melakukan
9ceddf9b16
1 mengubah file dengan 9 tambahan dan 0 penghapusan
  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;
        public
         constructor create(sym: tstaticvarsym);virtual;
+        destructor Destroy; override;
         procedure parse_into_asmlist;
         { the asmlist containing the definition of the parsed entity and another
           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;
 
 
+    destructor tasmlisttypedconstbuilder.Destroy;
+      begin
+        fdatalist.free;
+        ftcb.free;
+        inherited Destroy;
+      end;
+
+
     procedure tasmlisttypedconstbuilder.tc_emit_stringdef(def: tstringdef; var node: tnode);
       var
         strlength : aint;