diff --git a/DESCRIPTION b/DESCRIPTION index 4bca9db..81122aa 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: checked Title: Systematically Run R CMD Checks -Version: 0.2.3.9004 +Version: 0.2.3.9005 Authors@R: c( person( diff --git a/NEWS.md b/NEWS.md index b327284..5294140 100644 --- a/NEWS.md +++ b/NEWS.md @@ -21,6 +21,9 @@ * Prettify output by stripping excessive new lines. +* Force garbage collection before scheduling task, to make sure any already + finished processes are removed from the memory. + # checked 0.2.3 * Use custom `checked` `finisher`'s instead of the `processx` `finalizer`'s diff --git a/R/check_design.R b/R/check_design.R index fee59c9..222cb3e 100644 --- a/R/check_design.R +++ b/R/check_design.R @@ -162,6 +162,9 @@ check_design <- R6::R6Class( # nolint cyclocomp_linter if (self$is_done()) { return(-1L) } + + # force garbage collection to free memory from terminated processes + gc(verbose = FALSE, reset = FALSE, full = TRUE) # if all available processes are in use, terminate early n_active <- length(private$active)