diff options
Diffstat (limited to 'src/frame.h')
| -rw-r--r-- | src/frame.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/frame.h b/src/frame.h index 6bd32104..69983c4a 100644 --- a/src/frame.h +++ b/src/frame.h @@ -49,18 +49,13 @@ public: Frame (R* reader, int n, boost::shared_ptr<const DecryptionContext> c) { /* XXX: unfortunate guesswork on this buffer size */ - _buffer = new B (Kumu::Megabyte); + _buffer.reset(new B(Kumu::Megabyte)); if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c->context(), c->hmac()))) { boost::throw_exception (ReadError ("could not read frame")); } } - ~Frame () - { - delete _buffer; - } - uint8_t const * data () const { return _buffer->RoData (); @@ -72,7 +67,7 @@ public: } private: - B* _buffer; + boost::shared_ptr<B> _buffer; }; } |
