summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/udp_sink_impl.h
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-03-22 18:05:56 +0000
committerMartin Braun <martin@gnuradio.org>2020-03-27 08:46:42 -0700
commite917a9b207071b9ad5bd70b65ac4480065d081e1 (patch)
treec355ef5405b10f3c06eb7d598a8f30a36378b825 /gr-blocks/lib/udp_sink_impl.h
parent38853cc231adf5ff70051801d19545adbcb1337b (diff)
blocks/udp_sink: Remove manual memory management
Diffstat (limited to 'gr-blocks/lib/udp_sink_impl.h')
-rw-r--r--gr-blocks/lib/udp_sink_impl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gr-blocks/lib/udp_sink_impl.h b/gr-blocks/lib/udp_sink_impl.h
index 238abaca8d..22809f5af4 100644
--- a/gr-blocks/lib/udp_sink_impl.h
+++ b/gr-blocks/lib/udp_sink_impl.h
@@ -13,6 +13,7 @@
#include <gnuradio/blocks/udp_sink.h>
#include <boost/asio.hpp>
+#include <memory>
namespace gr {
namespace blocks {
@@ -27,7 +28,7 @@ private:
bool d_connected; // are we connected?
gr::thread::mutex d_mutex; // protects d_socket and d_connected
- boost::asio::ip::udp::socket* d_socket; // handle to socket
+ std::unique_ptr<boost::asio::ip::udp::socket> d_socket; // handle to socket
boost::asio::ip::udp::endpoint d_endpoint;
boost::asio::io_service d_io_service;