deletecloud: Copy and Delete C-side Clouds in dynaTree Objects
Description
Function(s) to free the memory used to represent particle clouds
stored on the C-side of a "dynaTree"-class object --
essential to avoid memory leaks; also a function to copy an entire
"dynaTree"-class object, which is required since explicit
code is needed to copy the C-side memory
Usage
# S3 method for dynaTree
copy(obj)
deletecloud(obj)
deleteclouds()
Value
The deleting functions do not return any value; the copy function
returns a copy of a "dynaTree"-class object
Arguments
obj
a "dynaTree"-class object built by dynaTree
with obj$num != NULL
Author
Robert B. Gramacy rbg@vt.edu,
Matt Taddy and Christoforos Anagnostopoulos
Details
deletecloud frees the particular C-side memory
associated to a particular object, and deleteclouds frees
all C-side clouds (i.e., all memory)
An object with obj$num != NULL has already had its
C-side cloud freed
copy.dynaTree returns a copied object with a new
obj$num after having copied the C-side memory
contents pointed to by the old obj$num