Permalink
Browse files

Destroy variables ref to avoid memory leaks

  • Loading branch information...
vti committed Feb 4, 2010
1 parent a62368d commit b3b40fdd45ded6af6ed90d4c9eefbc86d352541c
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/Text/Haml.pm
View
@@ -837,6 +837,9 @@ sub interpret {
my $output = eval { $compiled->($self) };
+ # Destroy variables refs to avoid memory leaks
+ $self->vars({});
+
if ($@) {
$self->error($@);
return undef;

0 comments on commit b3b40fd

Please sign in to comment.