develooper Front page | perl.perl5.porters | Postings from November 2009

Re: [perl #67838] lvalue substr keeping lexical alive

Thread Previous | Thread Next
From:
Kevin Ryde
Date:
November 27, 2009 01:40
Subject:
Re: [perl #67838] lvalue substr keeping lexical alive
Message ID:
877htc4x5c.fsf@blah.blah
"Eric Brine via RT" <perlbug-followup@perl.org> writes:
>
> lexicals aren't freed when they go out of scope. They stay
> allocated (along with their string buffer) for reuse the next time that
> scope is entered.

Ah, I didn't know that.  Makes it hard to work carefully with big
strings.  You'd be tempted to free big things, above some threshold, on
the relative badness of time taken to malloc a new block.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About