Created by: jacquesqiao
fix: https://github.com/PaddlePaddle/Paddle/issues/11100
according to https://developers.google.com/protocol-buffers/docs/reference/arenas
ReleaseLast
SubMessageType* ReleaseLast(): Returns a heap-allocated message equivalent to the last message in the repeated field, removing it from the repeated field. If the repeated field itself has a NULL arena pointer (and thus, all of its pointed-to messages are heap-allocated), then this method simply returns a pointer to the original object. Otherwise, if the repeated field has a non-NULL arena pointer, this method makes a copy that is heap-allocated and returns that copy. In both cases, the caller receives ownership of a heap-allocated object and is responsible for deleting the object.
analyse
If the message is allocated in arena memory pool, this function will make a copy on heap and return the pointer, but no one will delete the pointer in our code.