Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: Mini-Tutorial: Perl's Memory Management

by Anonymous Monk
on Oct 28, 2009 at 14:17 UTC ( #803686=note: print w/replies, xml ) Need Help??

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?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803686]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-11-22 03:54 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (314 votes). Check out past polls.