Skip to content

Conversation

@awjuliani
Copy link
Contributor

@awjuliani awjuliani commented Jun 28, 2018

Addresses the following memory leak bug: #930

RenderTexture.active = prevActiveRT;
RenderTexture.ReleaseTemporary(tempRT);
return tex;
return texture2D;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you just pass texture 2D by reference? Use out Texture2D texture2D as method parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

out assumes you will initialize within the function, which is explicitly what we don't want. I replaced it with a ref instead though.

@awjuliani awjuliani merged commit 5859862 into hotfix-0 Jun 28, 2018
@awjuliani awjuliani deleted the hotfix-visual-leak branch June 28, 2018 20:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2021
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