Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Case 1084800] Fix issue where TLS requests would reallocate a buffer when it could reuse it #1138

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

mderoy
Copy link

@mderoy mderoy commented Feb 12, 2019

Release Notes: Scripting: Fix Issue where TLS Requests would allocate lots of garbage (case 1084800)

@mderoy mderoy self-assigned this Feb 12, 2019
@mderoy mderoy requested a review from joncham February 12, 2019 20:06
@@ -70,7 +70,10 @@ public void Reset ()
{
Offset = Size = 0;
TotalBytes = 0;
Buffer = new byte[InitialSize];
if (Buffer.Length <= InitialSize)
Array.Clear (Buffer, 0, Buffer.Length);
Copy link
Author

Choose a reason for hiding this comment

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

Maybe I should be more strict and only do it if its the exact size as the buffer?

@mderoy mderoy merged commit 15b7795 into unity-master Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants