From: Jesse Luehrs Date: Tue, 21 Feb 2012 14:36:40 +0000 (-0600) Subject: comment about why we explicitly clear @ISA X-Git-Tag: 2.0500~40 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bc8d31d08f66ef0a3bc7a5cd5d2f3714e038af94;p=gitmo%2FMoose.git comment about why we explicitly clear @ISA --- diff --git a/lib/Class/MOP/Package.pm b/lib/Class/MOP/Package.pm index 079d28a..ad2202c 100644 --- a/lib/Class/MOP/Package.pm +++ b/lib/Class/MOP/Package.pm @@ -156,6 +156,8 @@ sub create { my ($first_fragments, $last_fragment) = ($name =~ /^(.*)::(.*)$/); no strict 'refs'; + # clear @ISA first, to avoid a memory leak + # see https://rt.perl.org/rt3/Public/Bug/Display.html?id=92708 @{$name . '::ISA'} = (); %{$name . '::'} = (); delete ${$first_fragments . '::'}{$last_fragment . '::'};