Skip to content

Hotfix - Visual observation memory leak #935

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

Merged
merged 3 commits into from
Jun 28, 2018
Merged

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.

2 participants