-------------
#!/usr/bin/perl
use strict;
use Devel::Leak;
my $count;
my $count2;
my $diff;
my $handle;
$count = Devel::Leak::NoteSV($handle);
my %Hash = (1 => 'a', 2 => 'b');
my $Data = {};
$Data->{'one'}->{'two'} = \%Hash;
my $Data2;
push (@{$Data2->{'one'}->{'two'}},@{$Data->{'one'}->{'two'}});
undef ($Data);
undef ($Data2);
$count2 = Devel::Leak::CheckSV($handle);
$diff = $count2 - $count;
print "Difference: $diff\n";
---------------
There is a memory leak equivalent to the size of the hash being used.In reply to Memory Leak by sparky8342
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |