[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOS. No garbage-collection on exit!

Quoting Sebastian H Seidel:
> My finalizers are ignored. The current-custodian is not called. What
> can I do to free my data on exit?

In v200 (maybe earlier, I forget), you can call


to install a procedure that is called at exit on all custodian-managed
objects. You don't need to bother with it merely to release memory,

> PS: What happens to the other data? Is MzScheme slowly drowning my
> computer with unfreed data if only I happen to start and exit it often
> enough?

No modern OS fails to release the memory associated with a process that
terminates --- where "modern" in this case can even be stretched to
include Mac OS 7.

For the more broken variants of Windows and Mac OS, there are some
resources that really must be released explicitly. MzScheme/MrEd uses
something like scheme_add_atexit_closer() to release those resources.