Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Use System.Buffers for temporary arrays #595

Closed
wants to merge 1 commit into from

Conversation

benaadams
Copy link
Contributor

Buffers only from #556

/cc @Tratcher

@@ -135,22 +180,27 @@ private Stream CreateTempFile()
public override int Read(byte[] buffer, int offset, int count)
{
ThrowIfDisposed();
if (_buffer.Position < _buffer.Length || _completelyBuffered)
if (_buffer.Position < _readIntoBuffer || _completelyBuffered)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did SetLength(0) not work for you?

@Tratcher Tratcher self-assigned this Mar 23, 2016
@Tratcher
Copy link
Member

Cleaned up, rebased, and merged. Thanks!

@Tratcher Tratcher closed this Mar 28, 2016
@muratg muratg mentioned this pull request Apr 5, 2016
@benaadams benaadams deleted the bufferpool-only branch May 10, 2016 11:31
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