Richard Maine said:
> if the compiler has a garbage collector. (It would have to be
> a pretty sophisticated garbage collector to catch this one because
> all of the nodes would still have something pointing to them, so
> the garbage collector would have to notice that the whole set of
> nodes was "closed". Though certainly possible, I'm not sure that
> there exist any garbage collectors that sophisticated in actual use.)
There are plenty: all mark/tracing collectors do that, it's only
reference counting ones that don't.
(I believe that most, if not all, of the garbage-collected Fortran
implementations are mark-and-trace not reference-counting, so any of
them will probably work for this particular problem. Certainly
NAGWare f95 contains such a collector).
Cheers,
--
...........................Malcolm Cohen, NAG Ltd., Oxford, U.K.
([log in to unmask])
|