HDFGroup / HDF.PInvoke

Raw HDF5 Power for .NET
http://www.hdfgroup.org/HDF5
Other
80 stars 29 forks source link

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

Open cuiocean opened 7 years ago

cuiocean commented 7 years ago

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.

hpbieker commented 6 years ago

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?