hdf_destroy — Deallocate an HDF data set.
bool hdf_destroy( | hdf) ; |
resource hdf
;
Frees memory resources associated with the HDF resource hdf
, returning true on success or false if there is an error.
![]() | Note |
---|---|
The variable representing |
hdf
must be the root node of the HDF, otherwise an error will be raised and the node will not be destroyed:
![]() | Tip |
---|---|
If you need to delete a node from an HDF use the hdf_remove_tree function. |
Example 21. Invalid use of hdf_destroy
<?php $hdf = hdf_init(); $node = hdf_get_node($hdf, 'Page.Menu.0'); hdf_destroy($node); // Invalid: error raised hdf_destroy($hdf); // OK ?>