| 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; |
nothing calls this directly
no outgoing calls
no test coverage detected