I\'m experiencing a crash in cxa_finalize
running a program (this is a program, and not a library within):
$ ./ac-test.exe
Assertion failed: AcLock
Assuming the dependency is non-cyclical, you can just leverage the standard behavior of initialization in the order of code flow entry into the function and destruction in reverse order of initialization.
In other words, have a call to GetLogger() to initialize the logger and then GetAcceptSockets() to initialize the list. This will result in the socket list getting destructed first (while the logger still exists) and then the logger getting destructed last.