diff options
author | Josh Blum <josh@joshknows.com> | 2010-06-02 17:44:20 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-06-02 17:44:20 -0700 |
commit | b2054a45d45ba85e30ff601159b18f5ebd15dd76 (patch) | |
tree | ab0d9919385190f26fee05ebb48656755d0b92cb /host/lib/transport/zero_copy.cpp | |
parent | 33193a06c1bc197a603f831109533230dc14b4c9 (diff) | |
download | uhd-b2054a45d45ba85e30ff601159b18f5ebd15dd76.tar.gz uhd-b2054a45d45ba85e30ff601159b18f5ebd15dd76.tar.bz2 uhd-b2054a45d45ba85e30ff601159b18f5ebd15dd76.zip |
Created macros for dealing with pimpls and implemented in code.
Diffstat (limited to 'host/lib/transport/zero_copy.cpp')
-rw-r--r-- | host/lib/transport/zero_copy.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/host/lib/transport/zero_copy.cpp b/host/lib/transport/zero_copy.cpp index f69fd2774..27f41329b 100644 --- a/host/lib/transport/zero_copy.cpp +++ b/host/lib/transport/zero_copy.cpp @@ -58,12 +58,12 @@ struct phony_zero_copy_recv_if::impl{ }; phony_zero_copy_recv_if::phony_zero_copy_recv_if(size_t max_buff_size){ - _impl = new impl; + _impl = UHD_PIMPL_MAKE(impl, ()); _impl->max_buff_size = max_buff_size; } phony_zero_copy_recv_if::~phony_zero_copy_recv_if(void){ - delete _impl; + /* NOP */ } managed_recv_buffer::sptr phony_zero_copy_recv_if::get_recv_buff(void){ @@ -122,7 +122,7 @@ struct phony_zero_copy_send_if::impl{ }; phony_zero_copy_send_if::phony_zero_copy_send_if(size_t max_buff_size){ - _impl = new impl; + _impl = UHD_PIMPL_MAKE(impl, ()); _impl->send_mem = new boost::uint8_t[max_buff_size]; _impl->send_buff = managed_send_buffer::sptr(new managed_send_buffer_impl( boost::asio::buffer(_impl->send_mem, max_buff_size), @@ -132,7 +132,6 @@ phony_zero_copy_send_if::phony_zero_copy_send_if(size_t max_buff_size){ phony_zero_copy_send_if::~phony_zero_copy_send_if(void){ delete [] _impl->send_mem; - delete _impl; } managed_send_buffer::sptr phony_zero_copy_send_if::get_send_buff(void){ |