ForeignObj Finalizer in Hugs
Sigbjorn Finne
sof@galconn.com
Mon, 2 Jul 2001 08:48:27 -0700
"KAKIHARA Norihiro" <YIU04646@nifty.com> writes:
>
...
>
> But I found that my runhugs seemed to ignore finalizer...
>
> -------------------------------
....example code elided...
> -------------------------------
>
> Hugs prints:
> obj is born.
> obj is alive.
> obj dies.
>
> runhugs prints:
> obj is born.
> obj is alive.
>
>
> How does yours work?
>
Hi,
you've found another bug / lack of a feature. The runhugs wrapper to
the Hugs98 evaluator doesn't clean up after itself when finished &
performs a final GC, so stuff like ForeignObjs just die without being
finalized.
I've checked in a change that forces a final GC, which should eliminate
the difference in behaviour you're seeing between 'hugs' and 'runhugs'.
Thanks for reporting the problem.
--sigbjorn
If anyone feels that requiring a GC to be run at the end will be too much
of a hit perf-wise, let me know & I'll provide an option for turning this
bit on/off.