View source: R/releaseVariables.R
| releaseVariables | R Documentation |
Delete variables from the shared memory space. Actual release occurs only when no active views remain.
releaseVariables(namespace, variableNames)
namespace |
Character(1) used at registration time. |
variableNames |
Character vector of names to free. |
Registered buffers remain allocated until all views are released.
If any worker still holds a view, releaseVariables cannot reclaim memory.
Thread safety
Registered buffers may be read concurrently by many processes. Concurrent writes must be synchronized externally (e.g., interprocess mutex). Do not call the R API from secondary threads.
Wrappers such as memApply / memLapply call this function on.exit.
Invisibly, TRUE on success.
This call succeeds in removing ownership, but underlying memory is only unmapped
when every process has called releaseViews for those variables.
Use viewList and pageList for diagnostics.
registerVariables, releaseViews
ns <- "example"
X <- matrix(rnorm(100), 10, 10)
registerVariables(ns, list(X = X))
# later ...
releaseVariables(ns, "X")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.