Finalizing really works now (finalizing occured after compiler and loader
authorschani <none@none>
Thu, 5 Nov 1998 20:46:38 +0000 (20:46 +0000)
committerschani <none@none>
Thu, 5 Nov 1998 20:46:38 +0000 (20:46 +0000)
were deinitialized).

Makefile
main.c
src/cacao/cacao.c

index 06bb5c98241994f7c637739727c359cb5e72f644..9d3bae851eb729798aa9bd97edd0f79c768a7309 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,7 @@ endif
 #CFLAGS = -mieee -O3 -Wall $(THREAD_CFLAGS)
 
 CC = gcc
-#CFLAGS = -g3 -ieee $(THREAD_CFLAGS)
+#CFLAGS = -g -ieee $(THREAD_CFLAGS)
 CFLAGS = -O3 -ieee $(THREAD_CFLAGS)
 
 OBJ = main.o tables.o loader.o compiler.o newcomp.o builtin.o asmpart.o \
diff --git a/main.c b/main.c
index 40673045c156eb87b8ff2ba5d73d2ae71b744245..067fe7a9c299d742315dbccdb8b16341c6789874 100644 (file)
--- a/main.c
+++ b/main.c
@@ -711,9 +711,11 @@ int main(int argc, char **argv)
 
    /************************ Freigeben aller Resourcen *******************/
 
+       heap_close ();                          /* must be called before compiler_close and
+                                                                  loader_close because finalization occurs
+                                                                  here */
        compiler_close ();
        loader_close ();
-       heap_close ();
        unicode_close ( literalstring_free );
 
 
index 40673045c156eb87b8ff2ba5d73d2ae71b744245..067fe7a9c299d742315dbccdb8b16341c6789874 100644 (file)
@@ -711,9 +711,11 @@ int main(int argc, char **argv)
 
    /************************ Freigeben aller Resourcen *******************/
 
+       heap_close ();                          /* must be called before compiler_close and
+                                                                  loader_close because finalization occurs
+                                                                  here */
        compiler_close ();
        loader_close ();
-       heap_close ();
        unicode_close ( literalstring_free );