Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WheretIB/nullc
/ Create
Method
Create
ObjectPool.h:21–30 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
19
}
20
21
T* Create()
22
{
23
if(!freeList.empty())
24
{
25
T* ptr = (T*)freeList.back();
26
freeList.pop_back();
27
return new (ptr) T();
28
}
29
return new T();
30
}
31
void Destroy(T* ptr)
32
{
33
ptr->~T();
Callers
1
operator new
Method · 0.45
Calls
2
empty
Method · 0.45
pop_back
Method · 0.45
Tested by
no test coverage detected