Skip Menu |
 

This queue is for tickets about the MooseX-Method-Signatures CPAN distribution.

Report information
The Basics
Id: 52527
Status: new
Priority: 0/
Queue: MooseX-Method-Signatures

People
Owner: Nobody in particular
Requestors: harv [...] ruin.nu
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.29
Fixed in: (no value)



Subject: Memory leak (cycle) with body member and $self
Download (untitled) / with headers
text/plain 729b
The 'body' key points to a function that gets $self through closure, resulting in a cycle. Using Scalar::Util::weaken() on $self in _wrapped_body() fixes the problem as far as I know. Cycle (2): $Class::MOP::Class::Immutable::Moose::Meta::Class::A-> {'methods'} => \%G $G->{'execute'} => \ %MooseX::Method::Signatures::Meta::Method::H $MooseX::Method::Signatures::Meta::Method::H->{'body'} => \&I $I variable $self => \$J $$J => \$K $$K => \ %MooseX::Method::Signatures::Meta::Method::H
Download (untitled) / with headers
text/plain 395b
On Mon Dec 07 06:33:19 2009, harv wrote: Show quoted text
> Using Scalar::Util::weaken() on $self in > _wrapped_body() fixes the problem as far as I know.
Actually, just noticed that it breaks things, since $self was really just a reference to a lexical variable in wrap() and reify(). Not sure how to solve that, all my experimentation leads to either to the object being destroyed too early or not at all.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.