File: torture.R

package info (click to toggle)
r-cran-withr 3.0.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 620 kB
  • sloc: sh: 13; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 457 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#' Torture Garbage Collector
#'
#' Temporarily turn gctorture2 on.
#'
#' @template with
#' @param new `[integer]`\cr run GC every 'step' allocations.
#' @param wait integer; number of allocations to wait before starting GC torture.
#' @inheritParams base::gctorture
#' @inheritParams local_
with_gctorture2 <- with_(gctorture2)
formals(with_gctorture2)[[3]] <- quote(new)

local_gctorture2 <- local_(gctorture2)
formals(local_gctorture2)[[2]] <- quote(new)