From d4cf5339da32900d90c6d2dd6fea3c0747140dc8 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 14 Jun 2015 16:39:38 +0200 Subject: Replace pointer in TimestampDecoder by shared_ptr --- src/TimestampDecoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/TimestampDecoder.cpp') diff --git a/src/TimestampDecoder.cpp b/src/TimestampDecoder.cpp index b03ecbb..5044366 100644 --- a/src/TimestampDecoder.cpp +++ b/src/TimestampDecoder.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "PcDebug.h" #include "TimestampDecoder.h" @@ -41,7 +42,8 @@ void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts) { - struct frame_timestamp* ts_queued = new struct frame_timestamp; + boost::shared_ptr ts_queued = + boost::make_shared(); /* Push new timestamp into queue */ ts_queued->timestamp_valid = full_timestamp_received_mnsc; @@ -87,8 +89,6 @@ void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts) ts.timestamp_sec, ts.timestamp_pps_offset, ts.timestamp_refresh);*/ - - delete ts_queued; } MDEBUG("Timestamp queue size %zu, delay_calc %u\n", -- cgit v1.2.3