Hey -
Can I confirm a piece of understanding about map fields?
I was traversing some message instances with map fields in C++, and it seems:
- if I traverse using known message types - for example get my_message.my_map_field() as a protobuf::Map<k,v>, and traverse the key value pairs inside there, I am dealing with the original data 'as is', and 'in situ'. So if the value type is a message, I'll find the address I get in the key value pair is the address of the message in the original context
- if I traverse using reflection, without knowing types or field names, I will have to call GetRepeatedField() to get the contents of the field; and critically, when I do that, the reflection API will generate temporaries representing the contents? So once I find the value message, it will NOT be in situ in the original message?
Do I have that correct?
All/any thoughts much appreciated.