deletecloud function

Copy and Delete C-side Clouds in dynaTree Objects

Copy and Delete C-side Clouds in dynaTree Objects

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

## S3 method for class 'dynaTree' copy(obj) deletecloud(obj) deleteclouds()

Arguments

  • obj: a "dynaTree"-class object built by dynaTree

    with obj$num != NULL

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

Returns

The deleting functions do not return any value; the copy function returns a copy of a "dynaTree"-class object

Author(s)

Robert B. Gramacy rbg@vt.edu ,

Matt Taddy and Christoforos Anagnostopoulos

See Also

dynaTree, update.dynaTree

Examples

deleteclouds() ## see the dynaTree and update.dynaTree help files ## and the demos (demo(package="dynaTree")) for ## more examples