On Wed, 6 Dec 2000, Dan Sugalski wrote:

> What I'm thinking is that we'll have a scoped destruct stack that gets
> pointers to variables that explicitly need destruction, and as we exit
> levels of scope we call the destructors of those variables that need it.
> (They can still be GC'd later to pick up their now-free memory) Most things
> won't get tossed on there, since most variables don't have any destruction
> behaviour.

If you don't reference count how do you protect yourself from DESTROYing
objects that are still referenced:

   my $new_dog;
   {
      my $dog = new Dog;
      $new_dog = \$dog;
   }

Did $dog just get erroneously collected by your destruct stack?  No?
Without reference counting?

Frankly these hybrid GC schemes look more like the *worst* of both worlds
than best - all the predictable performance problems of reference counting
with the unpredictable performance problems of mark and sweep!

-sam


Reply via email to