title: Is it OK to use boost::shared ptr in DLL interface?
body: <p>Is it valid to develop a DLL in C++ that returns boost shared pointers and uses them as parameters?</p>
  
  <p>So, is it ok to export functions like this?</p>
  
  <pre><code>1.) boost::shared_ptr&lt;Connection&gt; startConnection();
  2.) void sendToConnection(boost::shared_ptr&lt;Connection&gt; conn, byte* data, int len);
  </code></pre>
  
  <p>In special: Does the reference count work across DLL boundaries or would the requirement be that exe and dll use the same runtime?</p>
  
  <p>The intention is to overcome the problems with object ownership. So the object gets deleted when both dll and exe don't reference it any more.</p>