Subject: | Memory Leak with MooseX::Storage |
Date: | Mon, 22 Sep 2014 22:49:24 +0100 |
To: | bug-MooseX-Storage [...] rt.cpan.org |
From: | Chris Hughes <chris [...] lokku.com> |
I'm seeing memory issues in long lived processes using MooseX::Storage.
The simple example below seems to reproduce the issue (testing with perl
5.18.2, MooseX::Storage 0.46 and 0.47). The process continually grows by
~10Mb every 100,000 or so iterations.
package Obj;
use Moose;
use MooseX::Storage;
with Storage('format' => 'JSON');
has 'string', ( isa => 'Str', is => 'rw' );
__PACKAGE__->meta->make_immutable;
1;
my $Obj = Obj->new({ string => 'a string' });
while (1) {
$Obj->pack();
}