>>>>> "RR" == Robin Redeker <[EMAIL PROTECTED]> writes:
RR> I don't think circular references are used that much. This is RR> maybe something a programmer still has to think a little bit RR> about. And if it means, that timely destruction maybe becomes RR> slow only for the sake of collecting circular references... don't RR> know if thats a big feature.
ever do any callback stuff? an object needs to be called back from a service (say a i/o handler). it must pass itself to the service to be stored there. the service returns a handle which needs to be stored in the object so it can be used to manage it (start/stop/abort/etc.). there is a quick circular ref.
Oh, I realize that, along with a number of other useful uses of circular references. I can't speak for Robin, but when I said circular refs weren't that common I was talking in the overall number of things case. The large majority of objects are dead-stupid things that have no finalizers and no references to anything, the second largest (and definitely smaller case) is objects that refer to other objects in a non-circular fashion, then circular objects, then objects that need timely destruction.
Anyway, that usage pattern argues for efficiency handling simple PMCs first, reference/aggregate PMCs second, and ones with timely destructors last, which is how parrot's DOD/GC system's set up.
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk