On 5/11/07, James. L <[EMAIL PROTECTED]> wrote:
sorry, i wasn't clear. I understand that memory
allocated by a lexical variable(not reference) can be
released to perl. as described by the practical
modperl link you posted.

I would expect that both behave the same however you
are saying a reference won't release memory back to
Perl.

No, I'm not saying that at all.

If you look at a simple lexical scalar with Devel::Peek, not a
reference and not referenced by anything else but still in scope, you
will see it has a reference count of 1.  When it goes out of scope,
the reference count will go to 0.  The memory will not be returned to
perl's general pool at that point unless you call undef on it.  That's
all I was saying in the conversation you quoted.

- Perrin

Reply via email to