When would a Singleton not work as a Singleton? [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: cracking singleton with other ways Can anyone please tell me when a Singleton would not work as a Singleton ? 回答1: There is very good post published on Sun website by author Joshua Fox . Please go through this. below are some of them scenario when your Singleton doesn't behave like. Multiple Singletons in Two or More Virtual Machines Multiple Singletons Simultaneously Loaded by Different Class Loaders Singleton