Branden wrote: > Just set autoflush, if you're lazy... And say goodbye to performance... > > The problem is > > that you can not only count on $fh's DESTROY being called at the end of > > the block, you often can't count on it ever happening. > > Anyway, the file would be flushed and closed... That's not sufficient. Without deterministic finalisation, what does the folowing do? { my $fh = IO::File->new("file"); print $fh "foo\n"; } { my $fh = IO::File->new("file"); print $fh "bar\n"; } At present "file" will contain "foo\nbar\n". Without DF it could just as well be "bar\nfoo\n". Make no mistake, this is a major change to the semantics of perl. Alan Burlison
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Simon Cozens
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Hong Zhang
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Branden
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Branden
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Tim Bunce
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Damien Neil
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Branden
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Uri Guttman
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Alan Burlison
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Hong Zhang
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Alan Burlison
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Hong Zhang
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Dan Sugalski
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Alan Burlison
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Ken Fox
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Hong Zhang
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Ken Fox
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Dan Sugalski
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Tim Bunce