19/09/15 13:11, David Matthews wrote:
On 19/09/2015 12:30, Phil Clayton wrote:
Much appreciated.  For now I'd like to get a version working on top of
5.5.2, and I assume assignment will suffice there.  Is there a way to
create a non-overwritable ref in a normal session?  I don't seem to be
able to access LibrarySupport.noOverwriteRef (and these seem to be
needed for cleanAtExit to work).

Are you sure that LibrarySupport.noOverwriteRef is actually required for
the finalisers to be run on exit?  It should only make a difference if
you're saving state.  I've just tried editing basis/Finalizable.sml so
that will compile under 5.5.2-fixes and tested it with a simple example
and it does what I'd expect.

My mistake - it seems I was testing the two versions on slightly different examples.

What I am actually observing is that finalizers are not run on exit for finalizable values that are in scope in the top-level environment. On exit, the REPL has finished, so shouldn't such values be garbage collected and therefore finalized?

Phil

_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to