Widget wag = *new Widget()
<p>I just came across a C++ SDK that makes heavy use of this really weird <code>*new</code> pattern.  I dont understand why they do it like that at all.</p>

<p>What's the point of constructing objects with *new, e.g.  <code>Widget wag = *new Widget();</code>?</p>

<p>Update: Interesting, they are actually doing <code>XPtr&lt;T&gt; p = *new T;</code> - must be the semantics of some smart pointer magic.  Still doesn't make much sense.  I do trust the SDK is high quality.</p>
