iOS App Crashes due to insufficient memory

Hi there, I am currently developing a mobile app with realistic graphics (something similar to the zen garden app). I am pretty new to UE4 and have been trying to learn on mobile development.

However, I am currently facing memory management problems. The application seems to be crashing after opening and stream 4-6 different levels depending on the size of the levels. Individually, the levels worked fine, but upon loading different levels one after another the app crashes.

Below are a few things I have done to help relief in memory management:

  1. I have unload/unstream my levels before I open a new level
  2. I have removed all my UMG at the start of each new level
  3. I have garbage collect at the beginning of each new level

The performance seemed to improve. But crashing issue still happened after. The diagnostics have shown to be a jetsam event which I read was a memory management issue.

I am asking if there are any good practices and helpful methods for mobile app optimization?

Thanks in advance.

Maybe try to change a pool size and make some tweaks in DefaultDeviceProfile.ini?

The most frequent (in Objective C) are:

  • Unknown selector issue. i.e. you are calling a method which has not been implemented. It might be declared (in .h file) but not implemented (in .m file). Compiler wont notice it but app will crash when that piece of code executes.

  • Another one happens when you have created an outlet from storyboard/xib and then deleted that from the .h/.m file. i.e. when system tries to find the declaration (in code) for the said component (in storyboard) and fails, it will crash.

  • Setting nil as key in NSDictionary or adding nil to NSArray