MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / STLDeleteValues

Function STLDeleteValues

Bcore/src/main/cpp/base/stl_util.h:70–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68// in the case it's given a null pointer.
69template <class T>
70void STLDeleteValues(T *v) {
71 if (v != nullptr) {
72 for (typename T::iterator i = v->begin(); i != v->end(); ++i) {
73 delete i->second;
74 }
75 v->clear();
76 }
77}
78
79// Deleter using free() for use with std::unique_ptr<>. See also UniqueCPtr<> below.
80struct FreeDelete {

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected