Skip to content

Reacting to changes to MemoryManager (remove Length)#336

Merged
pakrym merged 1 commit into
dotnet:devfrom
ahsonkhan:UpdateMemoryManager
Apr 11, 2018
Merged

Reacting to changes to MemoryManager (remove Length)#336
pakrym merged 1 commit into
dotnet:devfrom
ahsonkhan:UpdateMemoryManager

Conversation

@ahsonkhan

@ahsonkhan ahsonkhan commented Apr 11, 2018

Copy link
Copy Markdown

@ahsonkhan

ahsonkhan commented Apr 11, 2018

Copy link
Copy Markdown
Author

Depends on new corefx packages with this change: dotnet/corefx#28981

Actually, given Length was a virtual property (not required to be overridden) and there is no one referencing MemoryPoolBlock.Length, we can merge this as is (not a source breaking change to aspnet).

MemoryPoolBlock (Debug) is an internal sealed class (and no one outside of the Common repo uses it anyway).

cc @joshfree

@benaadams

Copy link
Copy Markdown
Member
return new Memory<byte>(this, 0, _length);

will also need to change to call the protected

return CreateMemory(_length);

As that public .ctor is now internal (due to its unsafe nature)

@ahsonkhan

ahsonkhan commented Apr 11, 2018

Copy link
Copy Markdown
Author

As that public .ctor is now internal (due to its unsafe nature)

Good point. Thanks for the reminder. We can still remove the Length property though. I will address this change separately. Can we merge this @pakrym?

@pakrym
pakrym merged commit 0a744c0 into dotnet:dev Apr 11, 2018
@ahsonkhan
ahsonkhan deleted the UpdateMemoryManager branch April 11, 2018 21:29
@ghost ghost locked as resolved and limited conversation to collaborators May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants