Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

with_gctorture2

Torture Garbage Collector


Description

Temporarily turn gctorture2 on.

Usage

with_gctorture2(new, code, wait = new, inhibit_release = FALSE)

Arguments

new

[integer]
run GC every 'step' allocations.

code

[any]
Code to execute in the temporary environment

wait

integer; number of allocations to wait before starting GC torture.

inhibit_release

logical; do not release free objects for re-use: use with caution.

Value

[any]
The results of the evaluation of the code argument.

See Also

withr for examples


withr

Run Code 'With' Temporarily Modified Global State

v2.4.2
MIT + file LICENSE
Authors
Jim Hester [aut, cre], Kirill Müller [aut], Kevin Ushey [aut], Hadley Wickham [aut], Winston Chang [aut], Jennifer Bryan [ctb], Richard Cotton [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.