MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / operator delete

Method operator delete

practice/itemPool.cpp:74–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 void operator delete(void *ptr)
75 {
76 QueueItem *p = (QueueItem*)ptr;
77 p->_next = _itemPool; // 相当于接到链表头
78 _itemPool = p;
79 }
80
81 T _data;
82 QueueItem *_next;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected