MCPcopy Create free account
hub / github.com/cpputest/cpputest / clearAllAccounting

Method clearAllAccounting

src/CppUTest/MemoryLeakDetector.cpp:280–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void MemoryLeakDetectorList::clearAllAccounting(MemLeakPeriod period)
281{
282 MemoryLeakDetectorNode* cur = head_;
283 MemoryLeakDetectorNode* prev = NULLPTR;
284
285 while (cur) {
286 if (isInPeriod(cur, period)) {
287 if (prev) {
288 prev->next_ = cur->next_;
289 cur = prev;
290 }
291 else {
292 head_ = cur->next_;
293 cur = head_;
294 continue;
295 }
296 }
297 prev = cur;
298 cur = cur->next_;
299 }
300}
301
302void MemoryLeakDetectorList::addNewNode(MemoryLeakDetectorNode* node)
303{

Callers 1

TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64