Found a sceneTexture memory leaks

The engine is not working as expected? Documentation is wrong or out of date? Let us know here!
Forum rules
We are not providing support via this forum; it's community-driven. For official support see https://naninovel.com/support/#naninovel-support
Post Reply
zoelipg
Posts: 3
Joined: 26 Jan 2021 06:46

Found a sceneTexture memory leaks

Post 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!

Elringus
admin
Posts: 538
Joined: 11 May 2020 18:03

Re: Found a sceneTexture memory leaks

Post 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.

Post Reply