diff options
author | Johnathan Corgan | 2012-04-16 16:29:36 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-04-16 16:29:36 -0700 |
commit | ca7903db3bae8c0b167c39e0e78021724b7be4b3 (patch) | |
tree | 0fd3e83118fb583ddffdc257acda5b7fb0c73924 /gruel/src/lib | |
parent | 85bc95b0f6d95ab78db229df1d3c2b74c632aff4 (diff) | |
parent | 54f27eed4991daa41ccba37789a250abdab020a9 (diff) | |
download | gnuradio-ca7903db3bae8c0b167c39e0e78021724b7be4b3.tar.gz gnuradio-ca7903db3bae8c0b167c39e0e78021724b7be4b3.tar.bz2 gnuradio-ca7903db3bae8c0b167c39e0e78021724b7be4b3.zip |
Merge branch 'maint'
Diffstat (limited to 'gruel/src/lib')
-rw-r--r-- | gruel/src/lib/pmt/pmt.cc | 20 | ||||
-rw-r--r-- | gruel/src/lib/pmt/pmt_int.h | 9 |
2 files changed, 2 insertions, 27 deletions
diff --git a/gruel/src/lib/pmt/pmt.cc b/gruel/src/lib/pmt/pmt.cc index 9b1e14e75..1d9125d4e 100644 --- a/gruel/src/lib/pmt/pmt.cc +++ b/gruel/src/lib/pmt/pmt.cc @@ -58,13 +58,7 @@ pmt_base::operator delete(void *p, size_t size) #endif void intrusive_ptr_add_ref(pmt_base* p) { ++(p->count_); } -void intrusive_ptr_release(pmt_base* p) { - if (--(p->count_) == 0 ){ - //make a copy of deleter before we delete its container, p - boost::function<void(pmt_base *)> deleter = p->deleter_; - deleter(p); - } -} +void intrusive_ptr_release(pmt_base* p) { if (--(p->count_) == 0 ) delete p; } pmt_base::~pmt_base() { @@ -1389,16 +1383,4 @@ pmt_dump_sizeof() printf("sizeof(pmt_uniform_vector) = %3zd\n", sizeof(pmt_uniform_vector)); } -/* - * ------------------------------------------------------------------------ - * advanced - * ------------------------------------------------------------------------ - */ - -void -pmt_set_deleter(pmt_t obj, boost::function<void(pmt_base *)> &deleter) -{ - obj->deleter_ = (deleter)? deleter : &pmt_base::default_deleter; -} - } /* namespace pmt */ diff --git a/gruel/src/lib/pmt/pmt_int.h b/gruel/src/lib/pmt/pmt_int.h index bd2b5fe5a..d669e1049 100644 --- a/gruel/src/lib/pmt/pmt_int.h +++ b/gruel/src/lib/pmt/pmt_int.h @@ -38,15 +38,8 @@ namespace pmt { class GRUEL_API pmt_base : boost::noncopyable { mutable boost::detail::atomic_count count_; -public: - static void default_deleter(pmt_base *p){ - delete p; - } - - boost::function<void(pmt_base *)> deleter_; - protected: - pmt_base() : count_(0), deleter_(&pmt::pmt_base::default_deleter) {}; + pmt_base() : count_(0) {}; virtual ~pmt_base(); public: |