Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kalimehtar/finalizer

Common trivial finalizer for Racket
https://github.com/kalimehtar/finalizer

racket

Last synced: about 1 month ago
JSON representation

Common trivial finalizer for Racket

Awesome Lists containing this project

README

        

finalizer
=========

Common trivial finalizer for Racket

Usage:

```racket
(require finalizer)
(define a-box (box #f))
(register-finalizer a-box
(λ (x) (printf "a-box is now garbage\n")))
(collect-garbage) (collect-garbage) (collect-garbage)
(printf "breaking the link\n")
(set! a-box #f)
(collect-garbage) (collect-garbage) (collect-garbage)
```