garbage collecting extension types

From: Jin S. Choi <jsc_at_gwar.mit.edu>
Date: Thu, 4 May 1995 11:03:34 -0400

I tried extending STk with a new type last night, and found that the
documentation in that area was yet to be written, so I decided to give
it a shot anyway. There's something I don't quite understand about the
garbage collection. gc_mark_fct is to be called on any SCM objects in
your type, right? And gc_sweep_fct is to free up any non-SCM objects
and to free the object itself?

So here's the situation; I have a scheme function that returns one of
my new extended types. If I just say
(zreceive)
I get
#<znotice 80392b8>

Now I do a (gc) and notice that the sweep function gets called, but
not the mark function.

However, if I do (define foo (zreceive)) and then do a (gc), both
sweep and mark functions get called. Is this correct?
Received on Thu May 04 1995 - 17:22:36 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST