We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dfc0bb commit 7ff26c2Copy full SHA for 7ff26c2
1 file changed
src/Zlib-ng.NET/Zlibng.cs
@@ -10,7 +10,7 @@ public unsafe partial class Zlibng : IDisposable
10
/// <summary>
11
/// Library handle for the current zlib-ng instance
12
/// </summary>
13
- public nint Handle { get; }
+ public nint Handle { get; private set; }
14
15
16
/// Initializes via a native zlib-ng library path
@@ -48,8 +48,8 @@ public Zlibng(nint handle)
48
49
private void ReleaseUnmanagedResources()
50
{
51
- if (Handle != nint.Zero)
52
- NativeLibrary.Free(Handle);
+ NativeLibrary.Free(Handle);
+ Handle = nint.Zero;
53
}
54
55
/// <inheritdoc/>
0 commit comments