MCPcopy Create free account
hub / github.com/apache/trafficserver / _new_reference

Method _new_reference

plugins/esi/test/print_funcs.cc:78–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76std::atomic<int> DbgCtl::_config_mode{1};
77
78DbgCtl::_TagData const *
79DbgCtl::_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
93void
94DbgCtl::_rm_reference()

Callers

nothing calls this directly

Calls 3

emplaceMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected