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

Method ~PoolBuffer

cpp/src/arrow/memory_pool.cc:904–915  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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