On 5/11/07, James. L <suppressed> 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
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.