spikeinterface
spikeinterface copied to clipboard
Improved better conditions for closing nwb when using hdf5 backend
So we have been battling this for a while. Our access pattern of nwb when using the hdf5 backend directly (instead of the pynwb API) leaves files references dangling.
When looking a this, I see that we are keeping references to some groups and datasets even after closing the main reference. I am not sure if it is the weak reference or the way we access some properties were we don't copy at read.
At some point I have to look deeply into this but meanwhile this should alleviate some of the problems. This uses the low level API of h5py to access all the references to a particular id and tries to close them when calling del. It did solve my issue that I was facing but I am too skeptical to think this is the final nail on the coffin.