Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 browsing the Monastery: (4)
As of 2015-07-04 21:56 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 (60 votes), past polls