Skip to content

Commit

Permalink
Close leaky dataspace id
Browse files Browse the repository at this point in the history
  • Loading branch information
grimbough committed Nov 29, 2023
1 parent ef800c6 commit 27bab89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/testthat/test_H5A.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,14 @@ test_that("fixed length string attributes are correct", {
H5Tset_size(tid, nchar(attr_value))

fid <- H5Fopen(h5File)
sid <- H5Screate("H5S_SCALAR")
aid <- H5Acreate(fid, name = attr_name,
dtype_id=tid, h5space=H5Screate("H5S_SCALAR"))
dtype_id=tid, h5space = sid)

H5Awrite(aid, attr_value) # string of length 7

H5Aclose(aid)
H5Sclose(sid)
H5Fclose(fid)

attr <- h5readAttributes(h5File, "/")
Expand Down

0 comments on commit 27bab89

Please sign in to comment.