title: Protobuf: Will set_allocated_* delete the allocated object?
body: <p>I have this small protobuf code (simplified, only the necessary is contained):</p>
  
  <pre><code>message ParamsMessage {
      required int32 temperature = 1;
  }
  
  message MasterMessage {
      enum Type { GETPARAMS = 1; SENDPARAMS = 2;}
      required Type type = 1;
  
      optional ParamsMessage paramsMessage = 2;
  
  }
  </code></pre>
  
  <p>I now create a MasterMessage in the following way:</p>
  
  <pre><code>ParamsMessage * params = new ParamsMessage();
  params-&gt;set_temperature(22);
  MasterMessage master;
  master.set_type(MasterMessage::SENDPARAMS);
  master.set_allocated_paramsmessage(params);
  </code></pre>
  
  <p>The question is: Do I have to (after dealing with the message) delete the <code>params</code> Message, or will protobuf delete it for me? I cannot find anything in the docs.</p>