Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Memory issue with Hash

by BrowserUk (Pope)
on Dec 02, 2012 at 18:18 UTC ( #1006741=note: print w/ replies, xml ) Need Help??


in reply to Memory issue with Hash

I'm asking this becuase undefing the hash or reseting ( undef %hash or hash = () ) doesn't release the memory.

Prove it! (Ie. demonstrate your claim by posting working code; because what you claim is not normally true.)


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong


Comment on Re: Memory issue with Hash
Re^2: Memory issue with Hash
by Anonymous Monk on Dec 03, 2012 at 04:24 UTC
    Should be obvious enough... Emptying or undef'ing a hash might or might not set the reference-count of the objects in question to zero. And even if it does, garbage collection might not occur immediately. So the statement is quite pragmatically correct: you can zap a hash, check the memory allocation immediately thereafter, and find that nothing at all has changed. Yet. If the OP finds that memory is not being released, odds are quite good that there are circular references going on here which haven't been weakened.
      Should be obvious enough...

      Guess on if you like. I'll wait for the evidence.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      RIP Neil Armstrong

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2014-07-30 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls