Skip to content

Commit 165576a

Browse files
committed
fix: Fixed critical memory leak
1 parent 1d89e55 commit 165576a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

MemoryModule/NativeAssembly.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private static unsafe NativeAssembly LoadInternal(byte* data, long length, strin
148148
public void Unload()
149149
{
150150
IntPtr deadPtr = default;
151-
Interlocked.Exchange(ref _handle, deadPtr);
151+
deadPtr = Interlocked.Exchange(ref _handle, deadPtr);
152152

153153
FreeLibraryHandle(deadPtr);
154154
}

0 commit comments

Comments
 (0)