What causes JUCEApplication::shutdown() to be called?

I’m struggling to debug this. My Android app seems to call shutdown(), due to an unknown cause - I can’t see an assertion message. And strangely, it does not actually shut down! I can still call JUCE methods, get debug messages. But my main Component gets deleted, so my JUCE generated view disappears.

Its very hard to debug as the debugger loses track as soon as the JNI bridge is crossed.

Any tips much appreciated!

EDIT: Found the cause… (it was obvious: my Activity’s onDestroy method calling quitApp())
Please feel free to delete this post!