On Thu, Feb 15, 2001 at 02:26:10PM -0500, Uri Guttman wrote: > >>>>> "TB" == Tim Bunce <Tim.Bunce@ig.co.uk> writes: > > TB> As a part of that the weak reference concept, bolted recently into > TB> perl5, could be made more central in perl6. > > TB> Around 92.769% of the time circular references are known to be > TB> circular by the code that creates them (like a 'handy' ref back to > TB> a parent node). Having a weakref, or similar, operator in the > TB> language would help greatly. > > i second this. i am doing just what tim mentions. i have a child and > parent object referring back to each other for callback purposes. the > parent needs to own the child and the child has to have a parent ref to > make a method callback in the parent. there is no way out of creating > circular refs in that situation. i have to do an explicit object > shutdown so i don't leak ram. this isn't a big problem in stem since you > have to explicitly unregister stuff as well (that can't be done with > scope exit) but it would still be nice not to have to worry about the > ref loops. So why not use the WeakRef module (or whatever it's called)? Tim.Thread Previous | Thread Next