Hi, I am using protobuf in C++ but confused by set_allocated_xxx. For
example, there is a message PB_a which has a member of message PB_b. First
create a PB_a object named aa and a PB_b object named bb via new PB_a() and
new PB_b(). Then add bb to aa via set_allocated_PB_b(). So the question
After aa-set_allocated_PB_b(bb) aa will take the ownership of bb. It
means aa will be responsible to delete bb, so you only need to delete aa.
On Tue, Jul 23, 2013 at 5:42 AM, Icymaple Han icymaple2...@gmail.comwrote:
Hi, I am using protobuf in C++ but confused by set_allocated_xxx. For