I know that it is hard to “believe” that this happens but I have a breakpoint in destructor, I’m also printing something on console and writing something to a file and none of those things happen so the only thing I can assume is that it is not executed.
Same code as a Windows app is working perfectly fine. Is there something special about how Juce app on Android is closed?
I’m testing on Android version 13 => API 33; phone Pixel 4a. My destructor is composed of log message and one function for saving app state, in that order. I now tested approx. 10-15 times and only once I’ve seen log message but also then nothing was saved. When in debug mode, breakpoint in destructor never triggered.
This could be something not JUCE specific but Android specific and I agree completely with you, nothing important should be done in destructor because it doesn’t seem to have deterministic behaviour on Android.