Procházet zdrojové kódy

* fix tasmlisttypedconstbuilder memory leaks

git-svn-id: trunk@30851 -
Jonas Maebe před 10 roky
rodič
revize
9ceddf9b16
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  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;