Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2020-10-24 09:00 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (242 votes). Check out past polls.