At 11:36 PM 2/11/2001 -0500, Sam Tregar wrote:
>On Sun, 11 Feb 2001, Jan Dubois wrote:
>
> > However, I couldn't solve the problem of "deterministic destruction
> > behavior": Currently Perl will call DESTROY on any object as soon as the
> > last reference to it goes out of scope.  This becomes important if the
> > object own scarce external resources (e.g. file handles or database
> > connections) that are only freed during DESTROY.  Postponing DESTROY until
> > an indeterminate time in the future can lead to program failures due to
> > resource exhaustion.
>
>Well put.  Can we finally admit that if we want Perl to DWIM with respect
>to DESTROY that we need to keep counting references?

Perl needs some level of tracking for objects with finalization attached to 
them. Full refcounting isn't required, however. Also, the vast majority of 
perl variables have no finalization attached to them.

I do wish people would get garbage collection and finalization split in 
their minds. They are two separate things which can, and will, be dealt 
with separately.

For the record:

THE GARBAGE COLLECTOR WILL HAVE NOTHING TO DO WITH FINALIZATION, AND NO 
PERL OBJECT CODE WILL BE CALLED FOR VARIABLES UNDERGOING GARBAGE COLLECTION.

Thank you.

I do wish this stuff would flare up during the week...

>Speaking of which, do any of the high priests know when Larry might come
>down off the mountain?  Any day now the true believers are going to melt
>down their copies of Camel III and cast themselves a golden Python.

The Cabal Magic 5-ball says "Outlook cloudy, try again later".

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to