Browse Source

pmodules.pas, finish_unit:
* also release the generated proc symbol if the init function isn't needed

git-svn-id: branches/svenbarth/packages@32575 -

svenbarth 9 years ago
parent
commit
4bea75f3bf
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/pmodules.pas

+ 4 - 1
compiler/pmodules.pas

@@ -1080,7 +1080,10 @@ type
            begin
            begin
              { first release the not used init procinfo }
              { first release the not used init procinfo }
              if assigned(init_procinfo) then
              if assigned(init_procinfo) then
-               release_main_proc(init_procinfo);
+               begin
+                 release_proc_symbol(init_procinfo.procdef);
+                 release_main_proc(init_procinfo);
+               end;
              init_procinfo:=gen_implicit_initfinal(uf_init,current_module.localsymtable);
              init_procinfo:=gen_implicit_initfinal(uf_init,current_module.localsymtable);
            end;
            end;
          { finalize? }
          { finalize? }