| 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> && |