<div class="gmail_quote">2009/10/10 Ryan McConnehey <span dir="ltr">&lt;<a href="mailto:mccorywork@gmail.com">mccorywork@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have a class that provides a shared_ptr number.  At the end of the number&#39;s life cycle it should be placed back on a list of available numbers.  The shared_ptr&#39;s custom deleter function looks like what I need.  I&#39;m able to get a free function to compile as the deleter just fine.  In trying to use a class member function as the custom deleter I&#39;ve run into compile errors.  I&#39;m not sure where I&#39;m going wrong.  I know the custom deleter need to be copy constructible and I&#39;m probably breaking some assumed requirement.  Any help on what I&#39;m doing wrong would be appreciated. <br>

Ryan<br></blockquote><div><br>I&#39;m pretty sure you can&#39;t provide a functor as the custom deleter, only a free function. Probably due to space efficiency within the shared_ptr blob (4 byte pointer vs ~32 bytes for a boost::function).<br>
<br>Alex<br><br></div></div>

