|Perl Monk, Perl Meditation|
Re: Does undef free ram?by zejames (Hermit)
|on Jul 17, 2002 at 08:12 UTC||Need Help??|
Here is a little script for linux only that can help to understand what happens to memory:
If I use @test = ();, output is
and with undef @test;
Of course, this example is OS dependant. But you can notice that the first solution does not free any OS memory at all. As FatVamp said, Perl can then reuse the memory. It can be noticed that a few more memory is freed when using undef, but not all that was used.