Dave Mitchell wrote:
> 
> On Sun, Aug 17, 2003 at 05:48:14AM -0600, Luke Palmer wrote:
> > Here comes that ever-reincarnating thread again, sorry.
> >
> > This is a proposal for an efficient solution to the timely destruction
> > problem, which doesn't use refcounting, and fits in to the current
> > scheme pretty well.
> 
> I don't quite follow all the below (probably mainly due to my
> infamiliarity with parrot's DOD/GC stuff).
> 
> Would it be possible to illuminate it by explaining how the following
> Perl5 code (presumably being executed by Ponie/Parrot) would ensure that
> the two destructors are called at the places marked:
> 
>     {
>         my $ref;
>         {
>             my $obj1 = Foo->new(...);
>             my $obj2 = Foo->new(...);
>             $ref = $obj1;
>         } # $obj2->DESTROY called here
>         # ...
>     } # $obj1->DESTROY called here
>     # ...

At each of the two end-of-scope braces, a "sweep 0" instruction would be
emmited.  This performs Dead Object Detection, which at the first "}"
detects that $obj2 is dead, and at the second "}" detects that $obj1 is
unreachable.

-- 
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "[EMAIL PROTECTED]
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}

Reply via email to