samedi 29 octobre 2022

Main Differences between static class and singleton pattern?

What real (i.e. practical) difference exists between a static class and a singleton pattern?

Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?

Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?

Aucun commentaire:

Enregistrer un commentaire