Memory leaking issue #450
Unanswered
NorbiHQSC
asked this question in
Help Wanted!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
First of all, @jeffreylanters, thank you for your great project, it is really fantastic!
My solution does the following: a webview is running on android tablets, it is hosted as a local server and the Unity build files are also at localhost. I have different screens and some of them as a Unity mini game in it, as a plugin, it is packed to an APK. Currently I am using version 8.8.0.
The problem is, that once I load a Unity game, x amount of memory is used, but it is not released when I leave the screen and destroy the object. I call Application.Quit in unity, also unityContext.quitUnityInstance()
return () => {
console.log('Unload')
unityContext.removeAllEventListeners()
unityContext.quitUnityInstance()
unityContext.unityInstance = null
}
When I load Unity screen 4-5 times then tablet runs out of memory, an the android kills my APK.
I saw that 9.0.4. contains an unload method, but by checking the source it "just" calls the unityInstance.Quit() (Am I right?)
I also investigated the issue with chrome Profiler and found that JSArrayBufferData becomes really big and not released.
Do you have any solution or workaround to destroy the Unity from react?
Thanks a lot in advance!
Beta Was this translation helpful? Give feedback.
All reactions