Boost C++ Libraries: Ticket #944: smart_ptrs: Custom allocators. https://svn.boost.org/trac10/ticket/944 <pre class="wiki">I'd like to use the shared_ptr smart pointer, but the underlying types that I am using have their own specific *_alloc() and *_drop() functions instead of using new/delete. If the smart_ptr template classes took an allocator type as a template arg then we would just have to define our own allocators for things like this. By using a default allocator that used new/delete there would be no impact on current code. e.g. template&lt; typename T, typename Tallocator=default_allocator&lt;T&gt;&gt; class shared_ptr {}; Maybe the default_allocator&lt;&gt; is a bit like std::allocator&lt;&gt;, but I'm not sure about that. This would reduce the code for a lot of C-API wrapper projects. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/944 Trac 1.4.3 darinadler Wed, 07 Nov 2001 17:45:57 GMT <link>https://svn.boost.org/trac10/ticket/944#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/944#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=243358 Peter's revised shared_ptr will have this feature. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>nobody</dc:creator> <pubDate>Sun, 16 Jun 2002 12:19:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/944#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/944#comment:2</guid> <description> <pre class="wiki">Logged In: NO I think that the concept "allocator" can be used not only for the smart_ptr templates. It should be used on every place where a template parameter can accept a pair of functions/methods that perform a resource allocation and release. Other examples for this: - create / destroy - fopen / fclose - login / logout - lock / unlock (http://www.boost.org/libs/thread/doc/mutex_concept.html) </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 28 May 2003 12:06:11 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/944#comment:3 https://svn.boost.org/trac10/ticket/944#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket