EverestAPI / EverestAPI/Everest
Memory leaks related to NLua
- Dominant language
- C#
- Stars
- 516
- Forks
- 106
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 5
Description
If you go to a map using Lua Cutscenes (an easy way to replicate is the Beginner Heart Side in the spring collab) and repeatedly restart chapter, memory usage is going up. That is because NLua seems to keep references to everything that was used in the Lua cutscene... and those things (especially the Lua cutscene entity) can keep references to the level, which makes the leak worse.
I'm opening this issue here so that it isn't forgotten about, even if I don't know where the problem comes from (NLua, Everest or Lua Cutscenes) since I have no idea how NLua works.
(Note that I included a cursed mitigation system in Extended Variants, that obviously doesn't fix the issue but makes the leak smaller by making sure the level doesn't leak: https://github.com/max4805/Everest-ExtendedVariants/blob/master/ExtendedVariantMode/LeakPreventionHack.cs)
Contributor guide
Assessment
This issue has not been assessed yet.