Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How to return unused memory to OS?

by weismat (Friar)
on Oct 27, 2009 at 19:46 UTC ( #803504=note: print w/replies, xml ) Need Help??


in reply to How to return unused memory to OS?

Are you anyhwere setting any variables to undef or taking it out of scope?
As you pointed out this is reference counting, thus there needs to be no reference so that it can be garbaged collected.
Unfortunately Perl is not as smart as for instance the CLR for .NET to find cyclic references.
One solution could be to refactor your code to work with more functions with local variables.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803504]
help
Chatterbox?
[marioroy]: Added MCE::Inbox demonstration to Re^3: Hobo with a bit of recursion. I need to include MCE::Inbox in the next MCE::Shared release. That was fun.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2018-06-22 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (124 votes). Check out past polls.

    Notices?