[comp.lang.eiffel] arrays and garbage collection

genly@bubble.multiflow.COM (Chris Hind Genly) (02/07/90)

Arrays appear to be part of the Eiffel library, and not part of the
Eiffel language itself.  A C function called 'alloc' is called to
allocate space for the array.  Doesn't this prohibit the garbage
collector from knowing what type of data is kept in the array?  If so
doesn't this cause objects referenced through only an array to be
collected as garbage?!
--
=======================================================================
Chris Hind Genly, N1GLZ - Multiflow Computer - mfci!genly (203)488-6090

	

bertrand@eiffel.UUCP (Bertrand Meyer) (02/17/90)

In <1223@m3.mfci.UUCP>, genly@bubble.multiflow.COM (Chris Hind Genly)
asks:

> A C function called 'alloc' is called to
> allocate space for the array.  Doesn't this prohibit the garbage
> collector from knowing what type of data is kept in the array?  If so
> doesn't this cause objects referenced through only an array to be
> collected as garbage?!


No. Arrays are properly reclaimed by the garbage collector, and objects
referenced directly or indirectly by array elements are handled correctly.




-- 
-- Bertrand Meyer
bertrand@eiffel.com