Reputation: 2783
Below is a piece of code I am using and its output.
my $handle;
my $enterCount = Devel::Leak::NoteSV($handle);
print "$date entry $enterCount";
<<<< my piece of code >>>
my $leaveCount = Devel::Leak::CheckSV($handle);
print "$date exit $leaveCount";
output:
1)
Mon 11/10 02:34:55 entry 383852
Mon 11/10 02:35:03 exit 486726
2)
Mon 11/10 04:00:31 entry 383852
Mon 11/10 04:00:39 exit 493216
3)
Mon 11/10 04:05:15 entry 383852
Mon 11/10 04:05:23 exit 493927
Every time I run my script the $enterCount
value is same whereas the $leavecount
values keeps on increasing. What dose this signify? Does it represent memory leak ? What exactly does it show?
Upvotes: 3
Views: 426
Reputation: 6378
You could check these SO references from @ether:
jkeroes on Github has a list of resources on perl memory leaks.
Devel::Gladiator
is good for getting an overview of what is going on - you could probably modify your code to fit with the POD's Synopsis example.
Upvotes: 2