[gambit-list] call on gc

lowly coder lowlycoder at huoyanjinjing.com
Sat Jun 27 22:27:48 EDT 2009


Is it possible to have an object X so that some function gets called when X
is gc-ed?

Suppose I have something like

(define-type foo ...)
(define bar (foo-create ...))

and inside of bar, there's a C-land resource that I want to have freed up
when bar is GC-ed;

Is there a way to have some function like (foo-gc) s.t. when bar is GC-ed,
(foo-gc bar) is called?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090627/df2a8fe6/attachment.htm>


More information about the Gambit-list mailing list