Killed the last memory leak
Andy Grundman [Thu, 27 Oct 2005 15:57:32 +0000 (15:57 +0000)]
t/live/lib/TestApp/View/Dump.pm

index 71130aa..ad0f546 100644 (file)
@@ -4,6 +4,7 @@ use strict;
 use base 'Catalyst::Base';
 
 use Data::Dumper ();
+use Scalar::Util qw(weaken);
 
 sub dump {
     my ( $self, $reference ) = @_;
@@ -42,6 +43,7 @@ sub process {
 
         # Repair context
         $reference->{_context} = $context;
+        weaken( $reference->{_context} );
 
         # Repair body
         $reference->{_body} = $body;