Skip to content

Commit

Permalink
Breaking Change: Remove deprecated Arena::GetArena.
Browse files Browse the repository at this point in the history
This has been marked ABSL_DEPRECATED as of v4.23.x and should be replaced with a direct call to value->GetArena for performance reasons.

See https://engdoc.corp.google.com/eng/doc/devguide/proto/news/2024-10-02.md#arenagetarena

PiperOrigin-RevId: 700488709
  • Loading branch information
zhangskz authored and copybara-github committed Nov 27, 2024
1 parent 5bb4555 commit 30ed452
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/google/protobuf/arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,18 +345,6 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
impl_.AddCleanup(object, destruct);
}

// Retrieves the arena associated with |value| if |value| is an arena-capable
// message, or nullptr otherwise. If possible, the call resolves at compile
// time. Note that we can often devirtualize calls to `value->GetArena()` so
// usually calling this method is unnecessary.
// TODO: remove this function.
template <typename T>
ABSL_DEPRECATED(
"This will be removed in a future release. Call value->GetArena() "
"instead.")
PROTOBUF_ALWAYS_INLINE static Arena* GetArena(T* value) {
return GetArenaInternal(value);
}

template <typename T>
class InternalHelper {
Expand Down

0 comments on commit 30ed452

Please sign in to comment.