Skip to content

Commit

Permalink
Change rt.Release(); to RenderTexture.ReleaseTemporary(rt); (Since ca…
Browse files Browse the repository at this point in the history
…using memory leak)
  • Loading branch information
OISHIHiroaki committed Jul 2, 2015
1 parent b1b9425 commit dadb08c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SMAA/SMAA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void OnRenderImage(RenderTexture source, RenderTexture destination)
Graphics.Blit(source, rt, mat, 0);
Graphics.Blit(rt, destination, mat, 1);

rt.Release();
RenderTexture.ReleaseTemporary(rt);
}
else if (State == 3)
{
Expand All @@ -89,9 +89,9 @@ void OnRenderImage(RenderTexture source, RenderTexture destination)
}
Graphics.Blit(rt3, destination);

rt.Release();
rt2.Release();
rt3.Release();
RenderTexture.ReleaseTemporary(rt);
RenderTexture.ReleaseTemporary(rt2);
RenderTexture.ReleaseTemporary(rt3);
}
}
else
Expand Down

0 comments on commit dadb08c

Please sign in to comment.