.removeObject {SharedObject} | R Documentation |
Internal functions
.removeObject(dataId) .getProperty(x, property) .setProperty(x, property, value)
dataId |
A vector of numeric numbers. The keys of shared objects |
x |
A shared object |
property |
Character, the name of the property |
value |
The new value of the property |
.removeObject: This function will delete the data associated with the key
provided by the argument dataId
. Any try to read the data after the
function call might crash R. If dataId
is set to "all",
the function will delete all data. This function is for the case where
R is terminated abnormally without clearing the shared memory. In normal
case, R's garbage collector will free the shared memory and there is no
need to call this function.
.getProperty: This function returns a proporty of a shared object.
The available properties are dataId
,typeName
,ownData
,processId
,
typeId
,length
,totalSize
,copyOnWrite
,sharedSubset
,sharedCopy
,
setCopyOnWrite
,setSharedSubset
and setSharedCopy
.
.setProperty
: Set a property of a shared object.
.removeObject: no return value
.getProperty: The property of a shared vector or a list of properties of a data.frame
.setProperty: No return value
## Create a shared object A = share(1:10) ## Get the ID of the shared object id = .getProperty(A, "dataId") ## Delete the data associated with the ID .removeObject(id) ## Accessing the variable will cause an error since its ## data has been deleted. ## Not run: A ## End(Not run)