Render target feedback loop crashes on iOS
Hello! I'm just starting out in LS, and I've made a relatively simple effect that uses render targets and copyFrame.
Here's the lens: https://www.snapchat.com/unlock/?type=SNAPCODE&uuid=dc571210360242a187720a47b015945b&metadata=01
There's not much to the code, but here it is. 
The scene is fairly simple too. It uses two render targets, a slider, and a texture.
I feel like this is a device bug, but maybe I'm missing something obvious. I don't have an iOS device to test directly, but I've checked the memory usage on android and it's steady (meaning no mem leak)
Yea its crashing for IOS as well most likely a bug
Hi Josh,
You are correct. Using CopyTexture would memory leak--as the Lens would be storing the texture every frame to memory.
The better way to do this is to have a camera rendering to a render target (which will be the texture you display), and when you disable the camera, the last texture will be kept. In other words, you can use another camera as a buffer.
Let me know if you need any clarification :)
Cheers,
Jonathan
Digging back into it finally and found this nice project from Ben Knutson
https://www.youtube.com/watch?v=VwezNaX3HQ4