Android 11 and BabylonJS 8 consistent memory leak

Our App

It is a WebView in Android 11 that is loading a basic React app and using BabylonJS 8.

Our Issue

The issue that we see is that there is a consistent memory leak into the Native space even if there is no interaction and there are no active changes in the scene.

Our question is if anyone else has faced this Android 11 + BabylonJS 8 memory leak issue and if there is a solution to prevent it?

Please forgive the lack of exact details as this is an enterprise app and I can’t give exact code. We did put in a very basic scene with just a sphere that has zero changes in the render loop and we still noticed this memory leak. So we are just hoping (after all our searching and trial/error) if anyone else out there has a turn-key solution that we may have overlooked.

1 Like

I don’t remember anything specific with this configuration.

Maybe @sebavan does ?

Can it be because the GC is a bit slow to start collecting? Any infos with Chrome debug tools? Does it leak with other 3D web apps like Threejs or Playcanvas?

If the leak happens fast enough it is i would say 75% of the time textures and otherwise it would be buffers.

Are you using special features ? And could we inspect the web version outside the web view to narrow down the issue ?

I do not see that on projects I worked on with webview. It should not happen. Would be great to share a repro.