Skip to content

Fix release_nested_message typo in C++ arenas guide - #320

Open
Hashim1999164 wants to merge 2 commits into
protocolbuffers:mainfrom
Hashim1999164:fix/arena-release-nested-message-typo
Open

Fix release_nested_message typo in C++ arenas guide#320
Hashim1999164 wants to merge 2 commits into
protocolbuffers:mainfrom
Hashim1999164:fix/arena-release-nested-message-typo

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Jul 27, 2026

Copy link
Copy Markdown

Summary

In the inefficient arena release_...() example, the sample called release_message() even though the field used throughout the snippet is nested_message.

This updates that call to release_nested_message() so it matches set_allocated_nested_message and the unsafe arena APIs in the same section.

Fixes protocolbuffers/protobuf#28830

Test plan

  • Confirmed the surrounding examples already use release_nested_message / unsafe_arena_release_nested_message
  • Docs preview renders the corrected code block

The inefficient-usage example called release_message() but the field
is nested_message, matching the set_allocated and unsafe_arena APIs.
@google-cla

google-cla Bot commented Jul 27, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@shaod2
shaod2 requested a review from Logofile July 27, 2026 15:30
@shaod2

shaod2 commented Jul 27, 2026

Copy link
Copy Markdown
Member

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Hashim1999164 please fix

@Hashim1999164

Copy link
Copy Markdown
Author

@googlebot I signed it!

@Hashim1999164

Copy link
Copy Markdown
Author

recheck

@Logofile
Logofile requested review from shaod2 and removed request for Logofile July 28, 2026 16:51
@Hashim1999164

Copy link
Copy Markdown
Author

@googlebot I signed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

It seems there is a typo in C++ Arena Allocation Guide document.

2 participants