> On Fri, Sep 07, 2001 at 12:27:58AM -0700, Alex Krohn wrote:
> > while (1) {
> > {
> > my $var = 'x' x 500000;
> > my $sub = sub { my $sub2 = sub { $var; } };
> > }
> > # $var and $sub should be gone, but memory is never freed
> > sleep 1; # Don't crash things =)
> > }
> >
> > will grow forever
>
> > it does not grow, definately something strange going on. Happens on
> > perl 5.004_04, 5.005_03 and 5.6.1.
>
> confirmed in bleadperl (patch 11936). CCing p5p.
>
> atleast one sub { sub{} } leak was fixed recently, but not this one.
>
> - Barrie
Seems like we are not properly freeing the prototype CV which is cloned.
Arthur