Title: C Resource Cleanup via Exit Handlers
Version: 0.1.3
Description: Wrapper of .Call() that runs exit handlers to clean up C resources. Helps managing C (non-R) resources while using the R API.
License: MIT + file LICENSE
URL: https://github.com/r-lib/cleancall#readme, https://r-lib.github.io/cleancall/
BugReports: https://github.com/r-lib/cleancall/issues
Depends: R (≥ 3.4)
Suggests: covr, testthat (≥ 3.0.0)
Config/Needs/website: tidyverse/tidytemplate
Encoding: UTF-8
RoxygenNote: 7.0.2
Config/testthat/edition: 3
NeedsCompilation: yes
Packaged: 2022-10-26 12:42:31 UTC; gaborcsardi
Author: Lionel Henry [aut], Gábor Csárdi ORCID iD [aut, cre], RStudio [cph, fnd]
Maintainer: Gábor Csárdi <csardi.gabor@gmail.com>
Repository: CRAN
Date/Publication: 2022-10-26 13:05:07 UTC

cleancall: C Resource Cleanup via Exit Handlers

Description

Wrapper of .Call() that runs exit handlers to clean up C resources. Helps managing C (non-R) resources while using the R API.

Author(s)

Maintainer: Gábor Csárdi csardi.gabor@gmail.com (ORCID)

Authors:

Other contributors:

See Also

Useful links:


Call a native routine within an exit context

Description

C functions called this way can call the r_call_on_exit() and/or r_call_on_early_exit() functions to establish exit handlers.

Usage

call_with_cleanup(ptr, ...)

Arguments

ptr

A native pointer object.

...

Arguments for the native routine.

Handlers installed via r_call_on_exit() are always executed on exit. Handlers installed via r_call_on_early_exit() are only executed on early exit, i.e. not on normal termination.

C API

See Also

The package README file.