Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove $init-time-num leak from CORE
Related to #126889 , but that is really about another problem.
  • Loading branch information
lizmat committed Dec 13, 2015
1 parent e52617c commit 4bc8f33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/core/Instant.pm
Expand Up @@ -122,11 +122,8 @@ sub term:<now>() {
Instant.from-posix: nqp::time_n
}

#{
my num $init-time-num = nqp::time_n; # need find a way to not leak this
multi sub INITIALIZE_DYNAMIC('$*INITTIME') {
PROCESS::<$INITTIME> := Instant.from-posix: $init-time-num;
}
#}
multi sub INITIALIZE_DYNAMIC('$*INITTIME') {
PROCESS::<$INITTIME> := Instant.from-posix: Rakudo::Internals.INITTIME;
}

# vim: ft=perl6 expandtab sw=4
3 changes: 3 additions & 0 deletions src/core/Rakudo/Internals.pm
Expand Up @@ -621,6 +621,9 @@ my class Rakudo::Internals {
?? ("\e[31m", "\e[0m", "\e[32m", "\e[33m", "\x[23CF]")
!! ("", "", "", "", "<HERE>");
}

my num $init-time-num = nqp::time_n;
method INITTIME() { $init-time-num }
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 4bc8f33

Please sign in to comment.