Browse Source

* cleanup captured symbols when moving them from the nested function to the new method

Sven/Sarah Barth 2 years ago
parent
commit
965bba5ab4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      compiler/procdefutil.pas

+ 1 - 0
compiler/procdefutil.pas

@@ -1081,6 +1081,7 @@ implementation
                 begin
                 begin
                   captured:=pcapturedsyminfo(capturesyms[i]);
                   captured:=pcapturedsyminfo(capturesyms[i]);
                   pi.add_captured_sym(captured^.sym,captured^.fileinfo);
                   pi.add_captured_sym(captured^.sym,captured^.fileinfo);
+                  dispose(captured);
                 end;
                 end;
               capturesyms.clear;
               capturesyms.clear;
             end;
             end;