[plt-scheme] Writing Extensions

From: David Herman (dherman at ccs.neu.edu)
Date: Sun Apr 13 12:08:11 EDT 2003

Not sure if you've received responses yet, but I can answer a couple of  
your questions.

> 1. How do I return multiple values from a primitive?


> 2. How do I make sure things are garbage collected when (exit) is  
> called?  The
> databases need to close nicely to sync to the disk and right now they  
> don't.

Look for "void scheme_add_atexit_closer(Scheme_Exit_Closer_Func f)":

A thread explaining why GC doesn't get done on exit:

Another thread discussing exit behavior:

I haven't used this myself, but it looks like you can add a custom exit  
hook to make sure you close your databases, but you can't rely on all  
Scheme objects being finalized.

Dave Herman

Posted on the users mailing list.