While hunting down some memory leaks in my application I found that it's generally a bad idea to store $c in a class as this never gets cleared up completely, is that correct?
I'm also doing things like this which seem to cause major leaks: $foo->bar( coderef => sub { return $c->forward( '/someaction' ) } ); While I can imagine that a closure like that can cause trouble I don't see why the following is leaking memory, too: in a Controller: my $foo = Foo->new( $c ); in Foo.pm: sub new { my( $class, $c ) = @_; my $self = {}; $self->{ '_c' } = $c; bless $self, $class; } Maybe somebody can shed some light on this?! Is it possible (and sensible) to weaken $c before storing it? Thanks a lot! --Tobias _______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/