Skip to content

Refactor protobuf repeated field additions to use TYPE_ASSIGN macros.#2720

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_901337957
Open

Refactor protobuf repeated field additions to use TYPE_ASSIGN macros.#2720
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_901337957

Conversation

@copybara-service
Copy link
Copy Markdown

Refactor protobuf repeated field additions to use TYPE_ASSIGN macros.

Removes the TYPE_RETAIN_* macros and updates repeated field addition logic in GeneratedMessage.mm and RepeatedField.m to use the existing TYPE_ASSIGN_* macros. This simplifies the type handling by centralizing retain/release logic within the TYPE_ASSIGN macros. It does add an extra unneeded AUTORELEASE call at those assign locations, but I feel that removing the memory complexity is worth it.

Removes the TYPE_RETAIN_* macros and updates repeated field addition logic in GeneratedMessage.mm and RepeatedField.m to use the existing TYPE_ASSIGN_* macros. This simplifies the type handling by centralizing retain/release logic within the TYPE_ASSIGN macros. It does add an extra unneeded AUTORELEASE call at those assign locations, but I feel that removing the memory complexity is worth it.

PiperOrigin-RevId: 901337957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants