-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Object that has Reference to the SceneContext stay in memory after scene unloaded #246
Comments
What editor version? We are getting an infinite Application.Reload issue after the second time entering playmode with Unity 2020.3 with our project. 2019.4 is fine. Mabe it has the same root cause |
@johnfriedrich Unity 2020.3.12f1, i've fixed this issue with adding: private void OnDestroy()
{
_container.UnbindAll();
} in And, i also need to remove all reference manually when i injected a reference in a class (this is taking too much time). |
Zenject doesn't properly clear reference from scene container when scene is unloaded. This results in memory leak when loading and unloading scenes. Fixed the issue by unbinding all reference from scene container when SceneContext component is destroyed. modesttree#246
Zenject doesn't properly clear reference from scene container when scene is unloaded. This results in memory leak when loading and unloading scenes. Fixed the issue by unbinding all reference from scene container when SceneContext component is destroyed. modesttree#246
Zenject doesn't properly clear reference from scene container when scene is unloaded. This results in memory leak when loading and unloading scenes. Fixed the issue by unbinding all reference from scene container when SceneContext component is destroyed. modesttree#246
Hello!
I've found that Zenject somehow is "leaking" in memory, i used the advanced project example from Zenject. Any instances that has bound to SceneContext are kept in memory even when the scene has been unloaded such as the GameInstaller and anything that used Pool. Any help to solve this issue (or find a workaround for it) would be appreciated!
Steps to reproduce:
Sample Project to reproduce:
Zenject Test.zip
The text was updated successfully, but these errors were encountered: