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

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

Thread Previous | Thread Next
Kevin Ryde
November 27, 2009 01:40
Re: [perl #67838] lvalue substr keeping lexical alive
Message ID:
"Eric Brine via RT" <> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About