[gclist] Length of dependency chains

Charles Fiterman cef@geodesic.com
Thu, 17 Apr 1997 09:11:19 -0500


If finalizers are only being used to free logical
resources the typical length of a chain is 1. No
finalizer will require a prefinalized version of
any other object ever.

If finalizers are being used to implement exception
handeling in a CPS environment lengths can be about
five to ten. This is typical calling depth.

If finalizers are being used to remove items from
lists and hash tables lengths can be very long.
The billion dollar lottery bug becomes quite real.

If finalizers are being used for cleanup in a distributed
object environment lengths can be long and you may have
only a chance a day to clean up or less.

I'm interested in expanding the use of finalizers by
using them to enhance encapsulation. This means I like
guardians. 

I think you could have a default like topological
sorting with warnings. That is you do a topological
sort and put out a warning message for cycles but
do the cycle anyway. There are ways to kill the warning.

But if topological sorting is not what you want gaurdians
look like a highly general alternative.

			-  
Charles Fiterman		Geodesic Systems
414 North Orleans Suite 410	Phone 312 832 1221 x223
Chicago IL 60610-4418		FAX   312 832 1230
				http://www.geodesic.com

A computer language without garbage collection
  is like a city without garbage collection.