Your comment about tuning the garbage collector is appropriate to an environment (like, say, most jvms) which doesn't collect garbage immediately when the reference count reaches 0. Perl, however, doesn't do that.
Perl 5.8.0 does however have a few known memory leaks - I suggest you check to see if your bug is mentioned on http://rt.perl.org. Googling for "perl 5.8.0 memory leak" may also prove useful. One thing you may find is that it's not your hashes that are leaking - as you haven't told us what else you do in your code, it's hard to say. (It's been reported that in some perl versions, simply having a versioned "use" statement in a loop will end up leaking memory)
I'll add what another poster here said - see if you can reduce the code to a simple example that leaks and that you can post.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.