Re: portable finalizer



Marco Gidde wrote:
Tamas Papp <tkpapp@xxxxxxxxx> writes:

I am wrapping a void * cffi pointer and some extra information in a
CLOS object. When the object is garbage-collected, I would like to
have the memory location freed. I have found out how to do
finalization in SBCL, but I want to make my code portable.

A related question -- are finalizers called when the object falls out of scope, or when a GC is called?

If the latter, how can we instruct the GC to be aware of limited resources (like malloc'd memory, file handles, etc.)?

mfh
.



Relevant Pages

  • Re: portable finalizer
    ... Tamas Papp writes: ... CLOS object. ... finalization in SBCL, but I want to make my code portable. ... I have seen finalize implementations with #+ directives floating ...
    (comp.lang.lisp)
  • Re: portable finalizer
    ... CLOS object. ... finalization in SBCL, but I want to make my code portable. ... Finalization is the wrong tool for this. ... Look in the Lisp concept of ...
    (comp.lang.lisp)