spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

Improved better conditions for closing nwb when using hdf5 backend

Open h-mayorquin opened this issue 7 months ago • 0 comments

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.

h-mayorquin avatar Jul 04 '24 21:07 h-mayorquin