MCPcopy Create free account
hub / github.com/WheretIB/nullc / Destroy

Method Destroy

ObjectPool.h:102–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 void Destroy(T* ptr)
103 {
104 if(!ptr)
105 return;
106 allocated--;
107 MySmallBlock* freedBlock = static_cast<MySmallBlock*>(static_cast<void*>(ptr));
108 ptr->~T(); //Destroy object
109
110 freedBlock->next = freeBlocks;
111 freeBlocks = freedBlock;
112 }
113 int GetAllocatedCount()
114 {
115 return allocated;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected