Why SWAPING instead of just ERASE

75 views
Skip to first unread message

Seif Kandil

unread,
Dec 8, 2024, 1:08:59 PM12/8/24
to Protocol Buffers
Hello,

I am new to Protobuf and I saw in repeated fields, protobuf uses swapping and remove last so I had to use swapping with the last element and them call delete last. I know for sure that this is done for a reason and I would be very glad if someone explained it use simple concepts.

Thank you,

Best regards,
Seif

sh...@google.com

unread,
Dec 12, 2024, 5:34:22 PM12/12/24
to Protocol Buffers
Reply all
Reply to author
Forward
0 new messages