MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / Delete

Function Delete

common/memory.h:616–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614 T* get() const noexcept { return ptr_; }
615
616 void Delete() const noexcept {
617 if (static_cast<bool>(*this)) {
618 if (arena_ != 0) {
619 if ((arena_ & common_internal::kUniqueArenaBits) ==
620 common_internal::kUniqueArenaUnownedBit) {
621 // We never registered the destructor, call it if necessary.
622 if constexpr (!std::is_trivially_destructible_v<T> &&
623 !google::protobuf::Arena::is_destructor_skippable<T>::value) {
624 std::destroy_at(ptr_);
625 }
626 }
627 } else {
628 delete ptr_;
629 }
630 }
631 }
632
633 void PreRelease() noexcept {
634 if constexpr (!std::is_trivially_destructible_v<T> &&

Callers 3

~UniqueFunction · 0.70
memory.hFile · 0.70
resetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected