[racket] Notification when window is closed

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Aug 5 13:12:24 EDT 2012

On Sun, Aug 5, 2012 at 11:37 AM, Antonio Menezes Leitao
<antonio.menezes.leitao at ist.utl.pt> wrote:
> On Sun, Aug 5, 2012 at 2:27 PM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
>> My first guess is that the right way to do this is to use custodians
>> to do this shutdown, not closing the window (and perhaps make closing
>> the window shutdown the custodian, depending). Generally speaking,
>> custodians are the abstraction that Racket uses to manage the clean
>> shutdown of external state (like network connections, open files, open
>> windows, etc).
> Sounds like a good idea.  Is it possible to register a finalizer in a
> custodian?  Or something similar that allows me to call an FFI function.

I'm not as familiar with this layer of Racket, but I think you
probably want to start with scheme_add_managed and that region of the


Posted on the users mailing list.