in reply to Re: Strange memory leak question. Please help!
in thread Strange memory leak question. Please help!
Thank all for quick helps. Bellow is my report on the question.
talexb, I suspect my Perl program consumed my memory by using 'free -m' to look at the free memory. When I ran the Perl program, free memory decreased very fast and did not release after the Perl program stopped.
Fletch, you got the point. I forgot to delete the tree. Since I called HTML::TreeBuilder many times, that caused a serious memory wastage. After I deleted the tree, the memory leaking was almost solved.
When I say 'almost', I mean there is still very slow memory leaking, like 1M bytes several minutes. graff is right, the trouble comes from my large script (1305 lines :P). I should break the script into smaller components.
I didn't try Devel::Cycle and Test::Memory::Cycle, since I did not have complex reference structures.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Busted: Strange memory leak question. Please help!
by sfink (Deacon) on Sep 22, 2007 at 16:10 UTC | |
by catsophie (Initiate) on Sep 24, 2007 at 05:27 UTC |