HDF.PInvoke icon indicating copy to clipboard operation
HDF.PInvoke copied to clipboard

zlib.dll szip.dll hdf5.dll and hdf5_hl.dll are being used by another process

Open cuiocean opened this issue 7 years ago • 1 comments

When the unit test of my own method using HDF.PInvoke is executed, cleaning the solution will raise the error "Unable to delete file "\Hdf5.Tests\bin\Debug\bin64\zlib.dll". Access to the path '\Hdf5.Tests\bin\Debug\bin64\zlib.dll' is denied. "

Checking out the source code of HDF.PInvoke, running the unit tests and cleaning solution, will give the same error.

cuiocean avatar Aug 09 '17 15:08 cuiocean

The reason for this is that the library loades the dlls when running, and that they are never unloaded. I guess killing the test execution process should 'fix' this.

Is there a way to unload a native dll? In that case the unloaded cloud be added to a Dispose() method of the H5 class?

hpbieker avatar Dec 09 '17 07:12 hpbieker