summaryrefslogtreecommitdiff
path: root/gruel/src/lib/pmt/pmt_int.h
diff options
context:
space:
mode:
authorJosh Blum2012-04-03 14:50:06 -0700
committerJosh Blum2012-04-03 14:50:06 -0700
commit6cf6dc9c76bbacbecdb808c451ede9031668b34c (patch)
tree8c889c04d10f50644a5be344b5e6e026c7880d7e /gruel/src/lib/pmt/pmt_int.h
parentc774e6efb5f715c5f8b5f20bd8dea0051da667fd (diff)
downloadgnuradio-6cf6dc9c76bbacbecdb808c451ede9031668b34c.tar.gz
gnuradio-6cf6dc9c76bbacbecdb808c451ede9031668b34c.tar.bz2
gnuradio-6cf6dc9c76bbacbecdb808c451ede9031668b34c.zip
pmt: added advanded pmt_set_deleter (c++ only)
Diffstat (limited to 'gruel/src/lib/pmt/pmt_int.h')
-rw-r--r--gruel/src/lib/pmt/pmt_int.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gruel/src/lib/pmt/pmt_int.h b/gruel/src/lib/pmt/pmt_int.h
index 3a5cd382b..745dbc666 100644
--- a/gruel/src/lib/pmt/pmt_int.h
+++ b/gruel/src/lib/pmt/pmt_int.h
@@ -38,8 +38,15 @@ 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) {};
+ pmt_base() : count_(0), deleter_(&pmt::pmt_base::default_deleter) {};
virtual ~pmt_base();
public: