Moonflow-Studio/Moonflow-Lensflare-System

It may have some memory leaks?

Vampire-Z-V opened this issue · 3 comments

When I run the sample scene, I see the meshes memory in profiler increase sustainedly.
image

Then, I change the code in URPLensFlare.cs.
image

It seems every things work fine.
image

So, is it the right way to correct this problem?
And I don't know why the mesh will increase after clear :)
Unity Version: 2019.4.19

Wow……I hadn't recognized this problem and thank you for finding it. When the time I made this solution I was thought of using clear to reuse the memories which has already been declared, but it seemed not taken effect? I think that yours are temporary solution, for I think it will cause some GC on every frame. Maybe there will be a better solution?
However, I'll soon update the repository with your solution. For it won't make excessive memory overhead

Thanks for your reply. I will wait for your solution. ( ੭ ˙ᗜ˙ )੭

Thanks for your reply. I will wait for your solution. ( ੭ ˙ᗜ˙ )੭

I'm so sorry for I was busy in the past year and a half, I solved this problem now, and some new features was updated.