aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-13 10:48:07 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-13 10:48:07 +0100
commita0dc2cb85d7a89978b7240789bf9bb5b80035a1d (patch)
tree6f88ec871fd1528cbcd58cfbcda33caf7c85c681
parentefcb1f3c4a165b3fd3f9fc2d033303eea9ca74cb (diff)
parent7f3b54fe217a5822018a74799b0d53126a595486 (diff)
Merge branch 'master' of ssh://matthew@git.mysociety.org/data/git/public/fixmystreet
-rw-r--r--perllib/FixMyStreet/App.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 3aa81bd2b..b5838a169 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -385,6 +385,16 @@ sub uri_for_email {
return URI->new($email_uri);
}
+sub finalize {
+ my $c = shift;
+ $c->next::method(@_);
+
+ # cobrand holds on to a reference to $c so we want to
+ # get git rid of this to stop circular references and
+ # memory leaks
+ delete $c->stash->{cobrand};
+}
+
=head1 SEE ALSO
L<FixMyStreet::App::Controller::Root>, L<Catalyst>