[general] is there a noop deallocator in boost?
Hi all, I'm interested in a noop deallocator for use in shared_ptr, but can't find one in boost, so does anyone know of one? (I know it's trivial to write one, but that doesn't out weight the convenience of using a standardized one.) Thanks, Mostafa
I'm interested in a noop deallocator for use in shared_ptr, but can't find one in boost, so does anyone know of one? (I know it's trivial to write one, but that doesn't out weight the convenience of using a standardized one.)
Well, as far as I see, there's a ticket opened 3 years ago: https://svn.boost.org/trac/boost/ticket/1913 And there are several copies of null_deleter in various libraries, eg. in boost::serialization, boost::signals2, etc.
It is probably a good thing that there isn't a null_deleter in Boost,
after all it's just a single line of code that is difficult to mess
up:
struct null_deleter { template <class T> void operator()(T*) { } };
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode
On Mon, Mar 7, 2011 at 2:33 PM, Igor R
I'm interested in a noop deallocator for use in shared_ptr, but can't find one in boost, so does anyone know of one? (I know it's trivial to write one, but that doesn't out weight the convenience of using a standardized one.)
Well, as far as I see, there's a ticket opened 3 years ago: https://svn.boost.org/trac/boost/ticket/1913 And there are several copies of null_deleter in various libraries, eg. in boost::serialization, boost::signals2, etc. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Mon, 07 Mar 2011 14:33:19 -0800, Igor R
I'm interested in a noop deallocator for use in shared_ptr, but can't find one in boost, so does anyone know of one? (I know it's trivial to write one, but that doesn't out weight the convenience of using a standardized one.)
Well, as far as I see, there's a ticket opened 3 years ago: https://svn.boost.org/trac/boost/ticket/1913 And there are several copies of null_deleter in various libraries, eg. in boost::serialization, boost::signals2, etc.
Does any know the status of this ticket? Are there any plans to address it? Thanks, Mostafa
On Mon, 07 Mar 2011 14:33:19 -0800, Igor R
I'm interested in a noop deallocator for use in shared_ptr, but can't find one in boost, so does anyone know of one? (I know it's trivial to write one, but that doesn't out weight the convenience of using a standardized one.)
Well, as far as I see, there's a ticket opened 3 years ago: https://svn.boost.org/trac/boost/ticket/1913 And there are several copies of null_deleter in various libraries, eg. in boost::serialization, boost::signals2, etc.
Does any know the status of this ticket? Are there any plans to address it? Thanks, Mostafa
participants (3)
-
Emil Dotchevski
-
Igor R
-
Mostafa