Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit a9bd42146f2debc6f651123488d7e6a870ce3ab0 1 parent 31f7e20
Peter Bex authored

Showing 1 changed file with 17 additions and 0 deletions. Show diff stats Hide diff stats

  1. +17 0 tests/finalizer-error-test.scm
17 tests/finalizer-error-test.scm
... ... @@ -0,0 +1,17 @@
  1 +;;;; finalizer-error-test.scm - by "megane"
  2 +
  3 +(define n 10000)
  4 +
  5 +(define (make-objects n)
  6 + (let loop [(i 0)]
  7 + (let [(o (make-vector 100))]
  8 + ;(print "making " i)
  9 + (set-finalizer! o (lambda (ob) (print* " " i)))
  10 + (if (< i n)
  11 + (loop (+ 1 i))))))
  12 +
  13 +(set-finalizer! (make-vector 100) (lambda (ob) (+ i 'a)))
  14 +
  15 +(make-objects n)
  16 +
  17 +(print "done")

0 comments on commit a9bd421

Please sign in to comment.
Something went wrong with that request. Please try again.