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 f4a3a0e commit 289e9f8Copy full SHA for 289e9f8
src/ImageSharp/Memory/Allocators/Internals/ManagedBufferBase.cs
@@ -24,7 +24,9 @@ public override unsafe MemoryHandle Pin(int elementIndex = 0)
24
}
25
26
void* ptr = (void*)this.pinHandle.AddrOfPinnedObject();
27
- return new MemoryHandle(ptr, this.pinHandle, this);
+
28
+ // We should only pass pinnable:this, when GCHandle lifetime is managed by the MemoryManager<T> instance.
29
+ return new MemoryHandle(ptr, pinnable: this);
30
31
32
/// <inheritdoc />
0 commit comments