Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Does undef free ram?

by talexb (Canon)
on Jul 17, 2002 at 13:10 UTC ( #182418=note: print w/ replies, xml ) Need Help??


in reply to Does undef free ram?

Just to echo what bronto already said -- let the arrays you don't need go out of scope and let Perl take care of the memory management. That's cleaner than using undef on the arrays.

--t. alex

"Mud, mud, glorious mud. Nothing quite like it for cooling the blood!"
--Michael Flanders and Donald Swann


Comment on Re: Does undef free ram?
Re: Re: Does undef free ram?
by Elian (Parson) on Jul 17, 2002 at 15:16 UTC
    Except this isn't entirely true--perl doesn't release the memory used for the array itself, though the memory for the scalars is released. If you want an array's memory released, you do have to undef it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (19)
As of 2015-07-02 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (45 votes), past polls