Permalink
Browse files

Add finalizer test, which was accidentally left out of commit 8a6d9a4

(cherry picked from commit a9bd421)
  • Loading branch information...
1 parent 70d90bc commit 46bd6d4f350fe4f7d534567c50bcc6ba784fb82f Peter Bex committed with Jun 24, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 tests/finalizer-error-test.scm
@@ -0,0 +1,17 @@
+;;;; finalizer-error-test.scm - by "megane"
+
+(define n 10000)
+
+(define (make-objects n)
+ (let loop [(i 0)]
+ (let [(o (make-vector 100))]
+ ;(print "making " i)
+ (set-finalizer! o (lambda (ob) (print* " " i)))
+ (if (< i n)
+ (loop (+ 1 i))))))
+
+(set-finalizer! (make-vector 100) (lambda (ob) (+ i 'a)))
+
+(make-objects n)
+
+(print "done")

0 comments on commit 46bd6d4

Please sign in to comment.