Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

(cherry picked from commit a9bd421)
  • Loading branch information...
commit 46bd6d4f350fe4f7d534567c50bcc6ba784fb82f 1 parent 70d90bc
Peter Bex authored committed
Showing with 17 additions and 0 deletions.
  1. +17 −0 tests/finalizer-error-test.scm
View
17 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")
Please sign in to comment.
Something went wrong with that request. Please try again.