diff options
author | eb <eb@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-07-15 01:33:49 +0000 |
---|---|---|
committer | eb <eb@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-07-15 01:33:49 +0000 |
commit | 134b8933fd898fbd6462d1c3c0175e1f8157a27f (patch) | |
tree | a74050e1562ef98f2f1f52147d4cdc409b433f27 /pmt/src/lib/pmt.h | |
parent | fe781ab6591ad46b6ebb7ce425fc225c49461e70 (diff) |
pmt performance improvement: Switch from shared_ptr to intrusive_ptr
for pmt_t (c1258 from Stefan BrĂ¼ns).
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11442 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'pmt/src/lib/pmt.h')
-rw-r--r-- | pmt/src/lib/pmt.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pmt/src/lib/pmt.h b/pmt/src/lib/pmt.h index 24963fee71..d495b17a54 100644 --- a/pmt/src/lib/pmt.h +++ b/pmt/src/lib/pmt.h @@ -23,7 +23,7 @@ #ifndef INCLUDED_PMT_H #define INCLUDED_PMT_H -#include <boost/shared_ptr.hpp> +#include <boost/intrusive_ptr.hpp> #include <boost/any.hpp> #include <complex> #include <string> @@ -48,8 +48,10 @@ class pmt_base; * \brief typedef for shared pointer (transparent reference counting). * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm */ -typedef boost::shared_ptr<pmt_base> pmt_t; +typedef boost::intrusive_ptr<pmt_base> pmt_t; +extern void intrusive_ptr_add_ref(pmt_base*); +extern void intrusive_ptr_release(pmt_base*); class pmt_exception : public std::logic_error { |