MCPcopy Create free account
hub / github.com/apache/arrow / ~PoolBuffer

Method ~PoolBuffer

cpp/src/arrow/memory_pool.cc:909–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

907 : ResizableBuffer(nullptr, 0, std::move(mm)), pool_(pool), alignment_(alignment) {}
908
909 ~PoolBuffer() override {
910 // Avoid calling pool_->Free if the global pools are destroyed
911 // (XXX this will not work with user-defined pools)
912
913 // This can happen if a Future is destructing on one thread while or
914 // after memory pools are destructed on the main thread (as there is
915 // no guarantee of destructor order between thread/memory pools)
916 uint8_t* ptr = mutable_data();
917 if (ptr && !global_state.is_finalizing()) {
918 pool_->Free(ptr, capacity_, alignment_);
919 }
920 }
921
922 Status Reserve(const int64_t capacity) override {
923 if (capacity < 0) {

Callers

nothing calls this directly

Calls 3

is_finalizingMethod · 0.80
mutable_dataFunction · 0.70
FreeMethod · 0.45

Tested by

no test coverage detected