Baker Xiao Posted August 29, 2017 Share Posted August 29, 2017 During a recent profiling we found that a Scene object is being retained in the heap infinitely even if dispose is called. Apparently the Engine keeps an array of compiledEffects which then has fallback meshes that keep a reference to the scene and that prevented the scene object from being garbage collected. Is this expected? There's about 9MB of stuff that can be wiped out from our pathetic mobile device memory, so definitely hoping there's a way to collect it. Quote Link to comment Share on other sites More sharing options...
Baker Xiao Posted August 30, 2017 Author Share Posted August 30, 2017 BTW, we tried Engine.releaseEffects(). Unfortunately it doesn't help our case because what we are doing is that we are constructing scene2 when scene1 is about to end. During the construction of scene2, this https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.engine.ts#L2192 would leak an effect that references scene1 into scene2 making the whole scene1 object tree retained in the heap. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 30, 2017 Share Posted August 30, 2017 Good catch! I found a fix that will be available on the repo in a couple of hours Please let me know if it worked Baker Xiao, Aerion and adam 3 Quote Link to comment Share on other sites More sharing options...
Baker Xiao Posted August 31, 2017 Author Share Posted August 31, 2017 @Deltakosh you are the man! thanks a lot, it's fixed. Aerion 1 Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted August 31, 2017 Share Posted August 31, 2017 4 hours ago, Baker Xiao said: @Deltakosh you are the man! thanks a lot, it's fixed. @Deltakosh is da man Quote Link to comment Share on other sites More sharing options...
dbawel Posted September 1, 2017 Share Posted September 1, 2017 da man... really? Yeah, I'd have to agree. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.