[racket] Notification when window is closed

From: Michael Wilber (mwilber at uccs.edu)
Date: Sun Aug 12 23:50:29 EDT 2012

Nice! Thank you, Matthew.

Will such custodian shutdown callbacks be run when racket receives a

On Sun, 12 Aug 2012 20:36:36 -0600, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Sun, 5 Aug 2012 15:02:10 -0600, Matthew Flatt wrote:
> > Beware that FFI callback memory management is slightly tricky with
> > scheme_add_managed():
> I've added an `ffi/unsafe/custodian' library with a
> `register-custodian-shutdown' function to make this easier.
> The `register-custodian-shutdown' function also helps with a related
> problem: calling a shutdown callback when Racket exits. Most resources
> are released when the Racket process exits, but if an explicit release
> is needed, supply `#:at-exit? #t'.
> Of course, while `register-custodian-shutdown' makes custodian
> registration easier, there are still many low-level issues to consider
> --- such as the fact that the callback is invoked atomically in an
> unspecified Racket thread --- which is why it's under `ffi/unsafe'.
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.