>>>>> "TB" == Tim Bunce <[EMAIL PROTECTED]> 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.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

Reply via email to