R/torture.R
raw| 1 | #' Torture Garbage Collector |
| 2 | #' |
| 3 | #' Temporarily turn gctorture2 on. |
| 4 | #' |
| 5 | #' @template with |
| 6 | #' @param new `[integer]`\cr run GC every 'step' allocations. |
| 7 | #' @param wait integer; number of allocations to wait before starting GC torture. |
| 8 | #' @inheritParams base::gctorture |
| 9 | #' @inheritParams local_ |
| 10 | with_gctorture2 <- with_(gctorture2) |
| 11 | formals(with_gctorture2)[[3]] <- quote(new) |
| 12 | |
| 13 | local_gctorture2 <- local_(gctorture2) |
| 14 | formals(local_gctorture2)[[2]] <- quote(new) |