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

Re: COMPARING MEMORY ISSUES

by mikelieman (Pilgrim)
on Feb 05, 2009 at 21:33 UTC ( #741702=note: print w/ replies, xml ) Need Help??


in reply to COMPARING MEMORY ISSUES

One is empty.
The other is undefined.
undef $hashRef should do the trick, I'd think.


Comment on Re: COMPARING MEMORY ISSUES
Re^2: COMPARING MEMORY ISSUES
by almut (Canon) on Feb 05, 2009 at 21:51 UTC
    undef $hashRef should do the trick, I'd think.

    Yes, that would undef the reference itself — but that might not necessarily lead to the hash being undefined (which I think is what the OP is after...).  undef %$hashRef, OTOH, would undefine the hash being referenced.

    But I suspect the real question here is "why is the associated memory not being freed?" :)   If so, circular references (in data structures held in the hash) might be the reason...  Object::Destroyer might help in this case. Also see Re^3: Large Memory for a list of related modules that might help with locating circular references.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2014-07-25 13:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (172 votes), past polls