From b5e8a552c09a1b9a1397e731cc6f54d427df9a67 Mon Sep 17 00:00:00 2001 From: Thomas Habets <thomas@habets.se> Date: Fri, 10 Apr 2020 17:40:11 +0100 Subject: runtime: Remove most manual memory management The remaining ones: * `pmt_pool.cc`, which is a memory allocator so that makes sense * the tricky and aptly named `sptr_magic.cc`. --- gnuradio-runtime/lib/block_executor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnuradio-runtime/lib/block_executor.h') diff --git a/gnuradio-runtime/lib/block_executor.h b/gnuradio-runtime/lib/block_executor.h index b2eb2cab83..3b7089419b 100644 --- a/gnuradio-runtime/lib/block_executor.h +++ b/gnuradio-runtime/lib/block_executor.h @@ -15,6 +15,7 @@ #include <gnuradio/runtime_types.h> #include <gnuradio/tags.h> #include <fstream> +#include <memory> namespace gr { @@ -26,7 +27,7 @@ class GR_RUNTIME_API block_executor { protected: block_sptr d_block; // The block we're trying to run - std::ofstream* d_log; + std::unique_ptr<std::ofstream> d_log; // These are allocated here so we don't have to on each iteration -- cgit v1.2.3