Reference counting for matrices

Gerard Jungman jungman@lanl.gov
Tue Mar 14 11:31:00 GMT 2000


Klaus Schilling wrote:
> 
> And this doesn't depend on the garbage collection mechanism of the VHLL?
> The mark-and-sweep of guile, ruby, elastiC and ici doesn't ressemble at
> all the primitive refcounting of perl. Can one expect the same thing
> to work well with all of the various mechanisms?
> 
> Klaus Schilling

If I understand this message correctly, then I agree
completely. Leave garbage collection to the garbage
collectors. And C is not the best context in which
to deal with such things. Garbage collection should be
provided by a non-intrusive mix-in which can be turned
on and off at will. In the case of VHLL wrappers, the
mix-in is provided by the VHLL runtime facility, and the
wrapper implementation is straightforward. In the C++ world
you can provide a mix-in class to handle reference counting
when needed or insert a complete mark-and-sweep system
below the library implementation level, w/o disturbing the
underlying library objects. At the library level in C,
you would have to stand on your head. Forget it.

-- 
G. Jungman


More information about the Gsl-discuss mailing list