开发者

Singleton properties memory management

What attribute better appropriates to singleton's properties? As I k开发者_JAVA百科now singleton never deallocated, but I still have to retain its' properties or assign it's more correctly?


Your best bet is to retain and release all of your singleton's properties exactly the same way that you would for a non-singleton.

This will make things much easier to maintain, especially if one day you (or someone else) have to convert this singleton class into a non-singleton class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜