Ver código fonte

* remove chained overloades before releasing static symtable

git-svn-id: trunk@642 -
peter 20 anos atrás
pai
commit
34df933534
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      compiler/pmodules.pas

+ 6 - 2
compiler/pmodules.pas

@@ -1291,11 +1291,15 @@ implementation
              Message1(unit_u_implementation_crc_changed,current_module.ppufilename^);
 {$endif EXTDEBUG}
 
-         { release all local symtables that are not needed anymore }
+         { release all overload references and local symtables that
+           are not needed anymore }
+         tstoredsymtable(current_module.localsymtable).unchain_overloaded;
+         tstoredsymtable(current_module.globalsymtable).unchain_overloaded;
          free_localsymtables(current_module.globalsymtable);
          free_localsymtables(current_module.localsymtable);
 
-         { remove static symtable (=refsymtable) here to save some mem }
+         { remove static symtable (=refsymtable) here to save some mem, possible references
+           (like procsym overloads) should already have been freed above }
          if not (cs_local_browser in aktmoduleswitches) then
            begin
               st.free;