소스 검색

* remove chained overloades before releasing static symtable

git-svn-id: trunk@642 -
peter 20 년 전
부모
커밋
34df933534
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  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;