在我的应用程序中使用单例。我是否正确实施了它?

Using a singleton in my app. Am i implementing it correctly?

所以我有一个 class 应用程序。它只是一个 class 控制其中所有其他 classes。在开发中期,我们讨论过让这个应用程序 class 成为一个单例。这让其他开发人员明白,应该只有一个 App。这听起来合乎逻辑,也是使用单例的正确方法。唯一的问题是,如果您使用此单例访问其属性并让其他人可以访问它们。那么你使用的是单例"incorrectly"吗?我知道你不应该使用单例 "because it's convenient"。但这里是这样吗?

If you use this singleton to access its properties and make them accessible for others, are you then using a singleton "incorrectly"?

简答:否

长答案:视情况而定