diff options
author | Thomas Habets <thomas@habets.se> | 2020-04-10 17:40:11 +0100 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-04-11 01:41:39 +0200 |
commit | b5e8a552c09a1b9a1397e731cc6f54d427df9a67 (patch) | |
tree | dc60d92c7f53d5d15cbf42d2c5a2623a557eb7ca /gnuradio-runtime/include/gnuradio/buffer.h | |
parent | 616879745ce5d61e6acd54ad84d60359a739a27d (diff) |
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`.
Diffstat (limited to 'gnuradio-runtime/include/gnuradio/buffer.h')
-rw-r--r-- | gnuradio-runtime/include/gnuradio/buffer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-runtime/include/gnuradio/buffer.h b/gnuradio-runtime/include/gnuradio/buffer.h index b716accfd4..cb4ac42e28 100644 --- a/gnuradio-runtime/include/gnuradio/buffer.h +++ b/gnuradio-runtime/include/gnuradio/buffer.h @@ -148,14 +148,14 @@ private: int delay); protected: - char* d_base; // base address of buffer + char* d_base; // base address of buffer inside d_vmcircbuf. unsigned int d_bufsize; // in items // Keep track of maximum sample delay of any reader; Only prune tags past this. unsigned d_max_reader_delay; private: - gr::vmcircbuf* d_vmcircbuf; + std::unique_ptr<gr::vmcircbuf> d_vmcircbuf; size_t d_sizeof_item; // in bytes std::vector<buffer_reader*> d_readers; std::weak_ptr<block> d_link; // block that writes to this buffer |