http://www.perlmonks.org?node_id=803686


in reply to Re: Mini-Tutorial: Perl's Memory Management
in thread Mini-Tutorial: Perl's Memory Management

'free memory' is when you give up the memory block back to the OS,

'clear memory' is when you, for instance, say @a = ();, the variable still there but without content.

as ikegami said, perl does not free memory, so look at free in C if you still don't understand..
  • Comment on Re^2: Mini-Tutorial: Perl's Memory Management

Replies are listed 'Best First'.
Re^3: Mini-Tutorial: Perl's Memory Management
by oha (Friar) on Oct 28, 2009 at 17:21 UTC
    for what i understood i disagree, there are 3 phases:

    clear release the bind of the data to the variable

    free the data is released to the mem manager so can be reused by perl

    free to OS may happen in some cases after the free.

    Where the first 2 are how perl behave, and the last depends on the system (OS + how perl was compiled)

    Am i wrong?