I experienced a memory leak due to the temporary sprite not getting destroyed before handing back the renderTexture, I don't believe there is any reason to keep this around? So I just destroyed it, its Texture and its BaseTexture, before handing back the renderTexture, which fixed my memory leak.
Edit: Oh and my editor added a newline at the end of the file, hope that's cool.
I experienced a memory leak due to the temporary sprite not getting destroyed before handing back the
renderTexture
, I don't believe there is any reason to keep this around? So I just destroyed it, itsTexture
and itsBaseTexture
, before handing back therenderTexture
, which fixed my memory leak.Edit: Oh and my editor added a newline at the end of the file, hope that's cool.