Skip to content

Instantly share code, notes, and snippets.

@adaptiveoptics
Last active November 18, 2016 10:16
Show Gist options
  • Save adaptiveoptics/4aee4f9c530b160af9b89915ee9bfebe to your computer and use it in GitHub Desktop.
Save adaptiveoptics/4aee4f9c530b160af9b89915ee9bfebe to your computer and use it in GitHub Desktop.
Memory leak
use v6;
use MONKEY-SEE-NO-EVAL;
class T {
has &.app;
method loc() {
EVAL('sub app() {say 5}');
}
method tst() {
&!app //= self.loc;
return &!app;
}
}
loop {
my $t = T.new;
my &app = $t.tst;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment