Skip to content

Commit a24a693

Browse files
author
AI Agent
committed
HDF5 IO: cleanup resources upon failure in more functions
Apply the defer pattern (introduced in readAttribute fix) to ensure HDF5 resources are properly closed when exceptions occur in writeAttribute, readDataset, listPaths, listDatasets, listAttributes, and deleteAttribute. The defer pattern uses auxiliary::defer to register cleanup callbacks that run automatically when the function exits, ensuring resources are released even when errors occur mid-function.
1 parent dfb7d8c commit a24a693

1 file changed

Lines changed: 164 additions & 88 deletions

File tree

0 commit comments

Comments
 (0)