Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are Debug Objects turned off at creation?

creation debug objects turned
0
10 Posted

Why are Debug Objects turned off at creation?

0

The Debug Objects and Debug Channels are global objects. Because libcwd could not be dependant of libcw, they do not use libcw’s Global<> template. As a result, the order in which the debug channels and objects are initialized is unknown; moreover, other global objects whose constructors might try to write debug output could be constructed before the debug objects are initialized! The debug objects are therefore designed in a way that independent of there internal state of initialisation they function without crashing. It should be obvious that the only way this could be achieved was by creating them in the state off.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123