有人说
destroyApp(false)是正常退出
强制退出用destroyApp(true)
真的假的?
可是destoryApp(false)根本就不能退出啊。。
怎么个意思啊?
------解决方案--------------------------------------------------------
If true when this method is called, the MIDlet must cleanup and release all resources. If false the MIDlet may throw MIDletStateChangeException to indicate it does not want to be destroyed at this time.
------------------------------------------------------------------------------
参数为true时MIDlet必需清除和释放所有资源,如果为false,MIDlet 首先会抛出MIDletStateChangeException 去指示不想立即被销毁掉。
Note: The MIDlet can request that it not enter the Destroyed state by throwing an MIDletStateChangeException. This is only a valid response if the unconditional flag is set to false. If it is true the MIDlet is assumed to be in the Destroyed state regardless of how this method terminates. If it is not an unconditional request, the MIDlet can signify that it wishes to stay in its current state by throwing the MIDletStateChangeException. This request may be honored and the destroy() method called again at a later time.
If a Runtime exception occurs during destroyApp then they are ignored and the MIDlet is put into the Destroyed state.