]> gitweb.factorcode.org Git - factor.git/commitdiff
clean up global destructors as a shutdown hook in case exit is called
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 21 Oct 2009 17:32:51 +0000 (12:32 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 21 Oct 2009 17:32:51 +0000 (12:32 -0500)
core/destructors/destructors.factor

index 7b10a752122c72cc92babb600dcf52fb318fe7c4..afe40d861c823dbe03d188810f03973fc8158314 100644 (file)
@@ -91,3 +91,10 @@ PRIVATE>
         [ do-error-destructors ]
         cleanup
     ] with-scope ; inline
+
+[
+    [
+        always-destructors get-global dispose-each
+        error-destructors get-global dispose-each
+    ] with-destructors
+] "destructors.global" add-shutdown-hook