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

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

Thread Previous | Thread Next
Eirik Berg Hanssen
November 27, 2009 06:38
Re: [perl #67838] lvalue substr keeping lexical alive
Message ID:
"H.Merijn Brand" <> writes:

> On Fri, 27 Nov 2009 11:41:19 +1100, Kevin Ryde <>
> wrote:
>> "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.
> $s = undef;

  Did you mean undef($s), or did something change while I was not
looking? ;-)

Eirik, who doesn't use that feature often either
The price of success in philosophy is triviality.
                -- C. Glymour.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About