Skip to content

Commit

Permalink
Rename MemoryHandle PinnedPointer to Pointer and add property HasPoin…
Browse files Browse the repository at this point in the history
…ter. (dotnet#14604)

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
  • Loading branch information
ahsonkhan authored and safern committed Jan 16, 2018
1 parent ecc439e commit a26ce25
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public unsafe struct MemoryHandle : IDisposable
private GCHandle _handle;

[CLSCompliant(false)]
public MemoryHandle(IRetainable owner, void* pinnedPointer = null, GCHandle handle = default(GCHandle))
public MemoryHandle(IRetainable owner, void* pointer = null, GCHandle handle = default(GCHandle))
{
_owner = owner;
_pointer = pinnedPointer;
_pointer = pointer;
_handle = handle;
}

Expand All @@ -34,7 +34,9 @@ internal void AddOffset(int offset)
}

[CLSCompliant(false)]
public void* PinnedPointer => _pointer;
public void* Pointer => _pointer;

public bool HasPointer => _pointer != null;

public void Dispose()
{
Expand Down

0 comments on commit a26ce25

Please sign in to comment.