I use your plugin with the asset NatRecorder (a plugin that records the screen). It seems that in certain condition, OutlineEffect causes a memory leak when recording the screen with NatCorder. I found a quick fix to this issue, maybe you can tell me more about it. It seems than erasing rendertexture with the new renderTexture doesn't destroys the old one in the memory
if (renderTexture == null || renderTexture.width != sourceCamera.pixelWidth || renderTexture.height != sourceCamera.pixelHeight) {
Destroy(renderTexture); // Added line
renderTexture = new RenderTexture(sourceCamera.pixelWidth, sourceCamera.pixelHeight, 16, RenderTextureFormat.Default);
extraRenderTexture = new RenderTexture(sourceCamera.pixelWidth, sourceCamera.pixelHeight, 16, RenderTextureFormat.Default);
outlineCamera.targetTexture = renderTexture;
}
I use your plugin with the asset NatRecorder (a plugin that records the screen). It seems that in certain condition, OutlineEffect causes a memory leak when recording the screen with NatCorder. I found a quick fix to this issue, maybe you can tell me more about it. It seems than erasing rendertexture with the new renderTexture doesn't destroys the old one in the memory