The singleton pattern used in TrackerEdge and other firmware. This note explains why it’s used, how it works, and includes a handy code generator for creating a class with singleton support, as well as optional worker thread and mutex support, with your own custom class name.
https://docs.particle.io/datasheets/app-notes/an034-singleton/