diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1997-09-18 21:06:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1997-09-18 21:06:11 (GMT) |
commit | ef8604f3484a1547222ad73474e74788497d9079 (patch) | |
tree | af634636415858cb06d3b9f7981a54e1b0887eb2 /src/H5T.c | |
parent | ac0b9746301f65396ecada7704cc836d2a69c30c (diff) | |
download | hdf5-ef8604f3484a1547222ad73474e74788497d9079.zip hdf5-ef8604f3484a1547222ad73474e74788497d9079.tar.gz hdf5-ef8604f3484a1547222ad73474e74788497d9079.tar.bz2 |
[svn-r96] Added "atexit" routines to each interface to free buffers allocated during
runtime. Isolated but can't figure out how to fix bug reported with purify.
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -74,13 +74,36 @@ static herr_t H5T_init_interface(void) FUNC_ENTER (H5T_init_interface, NULL, FAIL); /* Initialize the atom group for the file IDs */ - ret_value=H5Ainit_group(H5_DATATYPE,H5A_DATATYPEID_HASHSIZE,H5T_RESERVED_ATOMS); + if((ret_value=H5Ainit_group(H5_DATATYPE,H5A_DATATYPEID_HASHSIZE,H5T_RESERVED_ATOMS))!=FAIL) + ret_value=H5_add_exit(&H5T_term_interface); FUNC_LEAVE(ret_value); } /* H5T_init_interface */ /*-------------------------------------------------------------------------- NAME + H5T_term_interface + PURPOSE + Terminate various H5T objects + USAGE + void H5T_term_interface() + RETURNS + SUCCEED/FAIL + DESCRIPTION + Release the atom group and any other resources allocated. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Can't report errors... + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +void H5T_term_interface (void) +{ + H5Adestroy_group(H5_DATATYPE); +} /* end H5T_term_interface() */ + +/*-------------------------------------------------------------------------- + NAME H5T_create PURPOSE Create a new HDF5 data-type object |