Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/gruel/src/lib/pmt/pmt.cc b/gruel/src/lib/pmt/pmt.cc
- index a7e0fd1..04ab8cf 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_(
- +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()
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement