| 76 | std::atomic<int> DbgCtl::_config_mode{1}; |
| 77 | |
| 78 | DbgCtl::_TagData const * |
| 79 | DbgCtl::_new_reference(char const *tag) |
| 80 | { |
| 81 | ++_RegistryAccessor::ref_count; |
| 82 | |
| 83 | auto it{_RegistryAccessor::registry().find(tag)}; |
| 84 | if (it == _RegistryAccessor::registry().end()) { |
| 85 | char *s = new char[std::strlen(tag) + 1]; |
| 86 | std::strcpy(s, tag); |
| 87 | auto r{_RegistryAccessor::registry().emplace(s, true)}; // Tag is always enabled. |
| 88 | it = r.first; |
| 89 | } |
| 90 | return &(*it); |
| 91 | } |
| 92 | |
| 93 | void |
| 94 | DbgCtl::_rm_reference() |