A common use for single games with lazy initialization (aka Meyers singleletons) is to control the initialization order of static objects (which in C ++ is undefined for different translation units). In this regard, singleton simply behave like global objects, but the order of their construction behaves well.
It is difficult to control the order of destruction. If you must rely on individual nodes to be destroyed in a specific order (for example, one of the journal classes that must survive the other instances of the same instance), see the Book of Alexandrescu to testify to the difficulty.
Alexandre C.
source share