Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803686]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2014-10-25 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls