Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit a26ce25

Browse files
ahsonkhansafern
authored andcommitted
Rename MemoryHandle PinnedPointer to Pointer and add property HasPointer. (#14604)
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
1 parent ecc439e commit a26ce25

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public unsafe struct MemoryHandle : IDisposable
1414
private GCHandle _handle;
1515

1616
[CLSCompliant(false)]
17-
public MemoryHandle(IRetainable owner, void* pinnedPointer = null, GCHandle handle = default(GCHandle))
17+
public MemoryHandle(IRetainable owner, void* pointer = null, GCHandle handle = default(GCHandle))
1818
{
1919
_owner = owner;
20-
_pointer = pinnedPointer;
20+
_pointer = pointer;
2121
_handle = handle;
2222
}
2323

@@ -34,7 +34,9 @@ internal void AddOffset(int offset)
3434
}
3535

3636
[CLSCompliant(false)]
37-
public void* PinnedPointer => _pointer;
37+
public void* Pointer => _pointer;
38+
39+
public bool HasPointer => _pointer != null;
3840

3941
public void Dispose()
4042
{

0 commit comments

Comments
 (0)