Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: COMPARING MEMORY ISSUES

by mikelieman (Friar)
on Feb 05, 2009 at 21:33 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://741702]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found