This adds calls to appletLockExit/appletUnlockExit and moves cleanup code into a Finalize function to allow proper cleanup and disable mission control's event redirection before termination when the user exits via the home button. I believe that without this the application is force-terminated when the home button is pressed and the code in the BtPairingManager destructor is never run.
I suspect this may be the cause of the crash-on-sleep issues people have been reporting.
This adds calls to
appletLockExit
/appletUnlockExit
and moves cleanup code into a Finalize function to allow proper cleanup and disable mission control's event redirection before termination when the user exits via the home button. I believe that without this the application is force-terminated when the home button is pressed and the code in theBtPairingManager
destructor is never run.I suspect this may be the cause of the crash-on-sleep issues people have been reporting.