At 05:55 PM 12/7/00 +0000, Piers Cawley wrote:
>Dan Sugalski <[EMAIL PROTECTED]> writes:
> > I think I'd just as soon always call DESTROY in a predicable manner
> > and not do *anything* perlish at GC time. If nothing else it means
> > that we don't have to worry about having a valid perl context handy
> > when the GC runs. (Since threading the thing is a possibility we
> > might run into issues otherwise)
>
>So objects that get caught up in a circular reference chain don't get
>their DESTROYs called? I'm not sure I'd be up for that. In fact, I'm
>sure I *wouldn't* be up for that. Or are we gonna still need 'use
>WeakRef'?
The problem there is that there's no good deterministic way to catch that
short of doing a full mark and sweep (or something similar) each time we
toss a pad that's got references in it. I suppose we could track pad
references and variable references separately and do a quick walk through
things when we trash a referring variable or pad, but I can see that
getting expensive. Maybe. (On the other hand, if it's correct...)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk