title: Copying a generic protobuf into a new object on the heap
body: <p>I want to make a copy of a generic <code>const</code> protobuf <a href="https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message" rel="noreferrer"><code>Message</code></a> for further manipulation. I came up with</p>
  
  <pre><code>Message* myfn(const Message *msg) {
    Message *copy = msg-&gt;New();
    copy-&gt;CopyFrom(*msg);
    // do stuff
    return copy;
  }
  </code></pre>
  
  <p>Is this correct/idiomatic? Or is there a better way (perhaps C++11 specific)?</p>