Timeline for When is Singleton appropriate?
Current License: CC BY-SA 2.5
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 20, 2023 at 0:34 | comment | added | gnasher729 | Global variables have their destructors called when the application exits, in unpredictable order. That means it is possible to try to access the singleton after it has been destructed. | |
| Dec 6, 2010 at 13:15 | comment | added | user2528 | -0 but i nearly -1. I would rather pass it everywhere in my code instead of use a singleton BUT if i am really lazy i may do that. I'd use global vars instead if i am able to or static members. global vars are really much preferable (to me) then singletons. Globals dont lie | |
| Sep 1, 2010 at 23:01 | history | answered | Brian R. Bondy | CC BY-SA 2.5 |