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

Re: Destructors



brucehoult@pobox.com (Bruce Hoult) writes:

> You can also call java.lang.Runtime.gc() to force a garbage collect at any
> time, or java.lang.Runtime.runFinalization() to force immediate
> finalization on all unreachable objects.

GD has a garbage-collection library and module, which exports a
GC-gcollect method that forces full garbage collection. In the
not-yet-implemented section are the methods GC-register-finalizer and
GC-invoke-finalizers. It should be easy to implement them, they are
wrappers around Boehm gc functions of the same name, the only trick is
the conversion of a Dylan function to a function pointer.

> Weak references, anyone?

GC-general-register-disappearing-link is the name of the function for
that. Also not implemented yet.

Andreas

-- 
"WARNING: DO *NOT* INSTALL WITHOUT THINKING."
  -- util-linux documentation



References: