Learn R Programming

ergm (version 4.7.1)

ergm_Cstate_clear: Deallocate the C data structures corresponding to an ergm_state left over from a .Call() run.

Description

This function is exported for use by other packages that use the ErgmState C API. It should be used as a part of an on.exit() call in the function that calls the C routine if the C routine contains R_CheckUserInterrupt() calls, in order to ensure that memory is freed if the routine is interrupted.

Usage

ergm_Cstate_clear()

Arguments

See Also

ergm_state

Examples

Run this code
if (FALSE) {
long_run <- function(...){
  on.exit(ergm_Cstate_clear())
  .Call("long_run",...)
}
}

Run the code above in your browser using DataLab