Found a sceneTexture memory leaks

Posted: 02 Mar 2021 06:09
by zoelipg

Hello! We found a memory leak from Naninovel (Naninovel/Runtime/UI/ISceneTransitionUI/SceneTransitionUI.cs) during scene transition. Basically, on scene transition in Naninovel, the object of temp buffer is set to null, which make it cannot be released on next scene transition, and a new buffer is allocated on next transition.

Here's the Unity Editor Memory Profiler result: https://drive.google.com/file/d/15ErIbo ... sp=sharing

More details for our fix, in SceneTransitionUI.cs,
we changed the inside TransitionAsync from

Code: Select all

sceneTexture = transitionTexture = null;

to

Code: Select all

transitionTexture = null;

Because it intends to fix a memory leak on sceneTexture object. If it's set to null, it won't be released on next scene transition. see CaptureScene().

Can we include this fix in the further Naninovel release?

Many thanks!


Re: Found a sceneTexture memory leaks

Posted: 02 Mar 2021 10:02
by Elringus

Hi, I wasn't able to find neither the line you've mentioned nor related memory leaks. Make sure you're using the latest v1.15 from #download channel.