Anyone publish big Android project with Mojo2?

Monkey Targets Forums/Android/Anyone publish big Android project with Mojo2?

Soap(Posted March) [#1]
We are running into out of memory crashes when switches game screens in a large project. It looks like a memory leak, but after a few seconds it goes back to normal. If screens are switched too quickly it crashes on lower end devices. It seems like the GC isn't being called soon enough? Or is there something else we need to be doing? Anyone know best practices for Android using Mojo2?


CopperCircle(Posted March) [#2]
You can try adding android:largeHeap="true" to your android manifest.


Nobuyuki(Posted April) [#3]
Try logging the crash with ddms and posting the error here. As CopperCircle said you may be running out of heap memory before the GC can sweep the memory leftover between screen switches. Without manually disposing of used resources, if you're loading image resources between screens for example can quickly exhaust available memory to the app before the GC has a chance to help.


Soap(Posted April) [#4]
android:largeHeap="true" did not help sadly

Issue was "solved" by using lower resolution backgrounds on devices with smaller screens.


Gerry Quinn(Posted April) [#5]
That sounds like you were running out of graphics memory, not ordinary RAM.