R/torture.R

#' Torture Garbage Collector
#'
#' Temporarily turn gctorture2 on.
#'
#' @template with
#' @param new `[integer]`\cr run GC every 'step' allocations.
#' @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)

Try the withr package in your browser

Any scripts or data that you put into this service are public.

withr documentation built on Nov. 2, 2023, 5:24 p.m.