How to implement singleton without using static/global 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With