示例#1
0
文件: h5a.go 项目: jonlawlor/go-hdf5
// Close releases and terminates access to an attribute.
func (s *Attribute) Close() error {
	if s.id == 0 {
		return nil
	}
	err := h5err(C.H5Aclose(s.id))
	s.id = 0
	return err
}
示例#2
0
文件: h5a.go 项目: simleb/go-hdf5
// Close releases and terminates access to an attribute.
func (s *Attribute) Close() error {
	if s.id > 0 {
		err := C.H5Aclose(s.id)
		s.id = 0
		return h5err(err)
	}
	return nil
}