From caf55184b2d0e8cbb99e5b487b453dc8721af4fe Mon Sep 17 00:00:00 2001 From: Chris Kennelly Date: Tue, 25 Jul 2023 15:01:09 -0700 Subject: [PATCH] Remove unnecessary branch. PiperOrigin-RevId: 551006963 --- src/google/protobuf/metadata_lite.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/google/protobuf/metadata_lite.h b/src/google/protobuf/metadata_lite.h index fa2bcea36062..f1f09509e353 100644 --- a/src/google/protobuf/metadata_lite.h +++ b/src/google/protobuf/metadata_lite.h @@ -182,11 +182,10 @@ class PROTOBUF_EXPORT InternalMetadata { template PROTOBUF_NOINLINE void DeleteOutOfLineHelper() { - // TODO(b/188560391): Determine if this branch is needed. - if (!arena()) { - delete PtrValue>(); - ptr_ = 0; - } + delete PtrValue>(); + // TODO(b/188560391): This store is load-bearing. Since we are destructing + // the message at this point, see if we can eliminate it. + ptr_ = 0; } template