Commit a24a693
AI Agent
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
0 commit comments