more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Date::Manip has a memory leak that I'm trying to track down, and I guess that I simply do not understand perl internals enough to understand what is causing the leak.
A trivial test script: #!/usr/bin/perl -w use Date::Manip::Date; $date = new Date::Manip::Date; use Devel::LeakTrace::Fast; $date->parse("2010-02-01 01:02:03");shows: leaked SV(0x0x1241a80) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ/amnew_00.pm line 39This is just one leak among many, but I figure if I can just understand one of them, I'll be able to figure out the others. There are a mixture of leaked AVs, SVs, and RVs if that matters all being reported at the same line 39. The referenced line 39 in amnew_00.pm looks like: %Dates = ( 1 => [ [ 1,1,2,0,0,0,1,1,1,19,3,58,'-04:56:02',-4,-56,-2, 'LMT',0,1883,11,18,16,59,59,1883,11,18,12,3,57, '0001010200:00:00','0001010119:03:58','1883111816:59:59','1883111812:03:57' ], ], ... );(there are a number of other hash elements too, but they are all of this format). This code is used exactly once in Date::Manip::TZ: no strict 'refs'; ... my $mod = $$self{'data'}{'Module'}{$zone}; eval "require Date::Manip::TZ::${mod}"; my %dates = %{ "Date::Manip::TZ::${mod}::Dates" }; $$self{'data'}{'Zones'}{$zone} = { 'Dates' => { %dates }, }; ... use strict 'refs';There are no circular references at this point (in previous versions, there were, but in the development version I'm working on now, I've removed them). I can provide the development version to anyone who wishes it. I'll be happy to provide any additional information needed In reply to Memory leak question by SBECK
|
|