From b48a3b64ed3f23b2e2d082c0511d43a94acd1cb0 Mon Sep 17 00:00:00 2001 From: Clayton Knittel Date: Tue, 11 Nov 2025 11:52:46 -0800 Subject: [PATCH] Replace call to `proto2::Arena::Destroy` with `delete`. `Arena::Destroy` conditionally `delete`s the pointer if it was not allocated on an arena, but in this branch of the code we know the object was not allocated on an arena, making the check redundant. PiperOrigin-RevId: 831010142 --- common/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/memory.h b/common/memory.h index fa8a14448..b19f54f94 100644 --- a/common/memory.h +++ b/common/memory.h @@ -625,7 +625,7 @@ class ABSL_ATTRIBUTE_TRIVIAL_ABI [[nodiscard]] Unique final { } } } else { - google::protobuf::Arena::Destroy(ptr_); + delete ptr_; } } }