MCPcopy Create free account
hub / github.com/bytedance/bolt / release

Method release

bolt/vector/VectorPool.cpp:74–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74bool VectorPool::release(VectorPtr& vector) {
75 if (FOLLY_UNLIKELY(vector == nullptr)) {
76 return false;
77 }
78 if (vector.use_count() != 1 || vector->size() > kMaxRecycleSize) {
79 return false;
80 }
81
82 auto cacheIndex = toCacheIndex(vector->type());
83 if (cacheIndex < 0) {
84 return false;
85 }
86 return vectors_[cacheIndex].maybePushBack(vector);
87}
88
89size_t VectorPool::release(std::vector<VectorPtr>& vectors) {
90 size_t numReleased = 0;

Callers 9

io_uring_supportedMethod · 0.45
~VectorRecyclerMethod · 0.45
codegenMethod · 0.45
cloneRangesMethod · 0.45
mergeWithMethod · 0.45
createMethod · 0.45
mergeWithMethod · 0.45
toBigintRangeFunction · 0.45

Calls 4

toCacheIndexFunction · 0.85
maybePushBackMethod · 0.80
sizeMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected