Is it safe to implement a MIDlet class as a singleton? That is, after all, the Display class is acting like a sin开发者_C百科gleton for each and every midlet so is the midlet itself a singleton by behaviour so that implementing it as such wouldn't break something?
In other words, it is not possible to have two instances of an app running, is it? I mean, the AMS wouldn't allow it, would it?
Thanks!
Normally Singleton classes have protected constructor, and this will cause a problem because the AMS needs the MIDlet class constructor to be public not protected nor private.
加载中,请稍侯......
精彩评论