summaryrefslogtreecommitdiff
path: root/gruel/src/lib
diff options
context:
space:
mode:
authorJohnathan Corgan2012-04-15 15:28:39 -0700
committerJohnathan Corgan2012-04-15 15:28:39 -0700
commitec7faa9b80dff18ef170d85efdd498bea3af4940 (patch)
treef282ed5bfab8e4f7f4bfa90a2fdfcbd27c5f022a /gruel/src/lib
parent81b2c2803bd9def8376e14cbe01998cb69139377 (diff)
parent04e2ebb979942cada74f10ea022342716c6851bf (diff)
downloadgnuradio-ec7faa9b80dff18ef170d85efdd498bea3af4940.tar.gz
gnuradio-ec7faa9b80dff18ef170d85efdd498bea3af4940.tar.bz2
gnuradio-ec7faa9b80dff18ef170d85efdd498bea3af4940.zip
Merge branch 'maint'
Diffstat (limited to 'gruel/src/lib')
-rw-r--r--gruel/src/lib/pmt/pmt.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gruel/src/lib/pmt/pmt.cc b/gruel/src/lib/pmt/pmt.cc
index a7e0fd19f..9b1e14e75 100644
--- a/gruel/src/lib/pmt/pmt.cc
+++ b/gruel/src/lib/pmt/pmt.cc
@@ -58,7 +58,13 @@ 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 ) p->deleter_(p); }
+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);
+ }
+}
pmt_base::~pmt_base()
{