<p dir="ltr">Hi John</p>
<p dir="ltr">Many places in NFD and ndn-cxx assume the packet (Interest or Data or Nack) are created with make_shared, even if the API takes a reference instead of shared_ptr.<br>
When a packet is created directly without make_shared, undefined behavior occurs which is usually bad_weak_ptr.</p>
<p dir="ltr">Yours, Junxiao</p>
<p dir="ltr">On Nov 9, 2016 07:53, "John Baugh" <<a href="mailto:jpbaugh@umich.edu">jpbaugh@umich.edu</a>> wrote:<br>
><br>
>      ndn::Data tempD;<br>
>      myContentStore.insert(tempD); <br>
><br>
> Shouldn't I just be able to do this?</p>