h5closeAll | R Documentation |
This functions can be used in two ways. Firstly, it can be passed one or
more H5IdComponent objects and it'll will try to close all of them
regardless of the whether they represent a file, group, dataset etc. This
can be easier than making multiple calls to H5Fclose()
, H5Gclose()
, etc.
h5closeAll(...)
... |
One or more objects of class H5IdComponent which should be closed. If nothing is provided to the function, all open handles will be closed. |
Secondly, cccasionally references to HDF5 files, groups, datasets etc can be created and not closed correctly. Maybe because a function stopped before getting to the close statement, or the open handle was not assigned to an R variable. If no arguments are provide this function identifies all open handles and closes them.
Doesn't return anything. Called for the side-effect of closing open HDF5 handles.
Mike Smith
## create an empty file and then re-open it
h5File <- tempfile(pattern = "ex_h5closeAll.h5")
h5createFile(h5File)
H5Fopen(h5File)
## list all open identifiers
h5listIdentifier()
## close all open identifiers and verify
h5closeAll()
h5listIdentifier()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.