title: reallocating boost::shared_array
body: <p>I have a shared_array:
  boost::shared_array myarr(new char[m_length]);</p>
  
  <p>I would like to reallocate the array. I thought of creating a new shared_array with the wanted size and using the swap boost method but this will copy the referance count as well.
  Do you have another idea?</p>
  
  <pre><code>//new_length&gt;m_length
  void func(boost::shared_array&lt;char&gt; &amp;myarr,int new_length)
  {
         boost::shared_array&lt;char&gt; new_arr(new char[new_length]);
         myarr.swap(new_arr);
  }
  </code></pre>