开发者

How to implement singleton without using static/global variable? Possible?

开发者 https://www.devze.com 2023-01-24 03:03 出处:网络
How to implement singleton without using static/globa开发者_C百科l variable? Possible? This is an interview question...Dependency injection is one possibility. Since your question is not specific to

How to implement singleton without using static/globa开发者_C百科l variable? Possible?

This is an interview question...


Dependency injection is one possibility. Since your question is not specific to any programming language, I am not posting framework specific syntax (such as Ninject)


Store the singleton in a file.


No. You need a place to store the singleton.

0

精彩评论

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