Merge "Ref count Timer implementation" into qt-dev

This commit is contained in:
Rahul Frias
2019-05-13 20:24:45 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 4 deletions

View File

@@ -9,6 +9,8 @@
#include <stdint.h> #include <stdint.h>
#include "utils/StrongPointer.h"
#include "disallow_copy_and_assign.h" #include "disallow_copy_and_assign.h"
namespace wvcdm { namespace wvcdm {
@@ -45,7 +47,7 @@ class Timer {
bool IsRunning(); bool IsRunning();
private: private:
Impl *impl_; android::sp<Impl> impl_;
CORE_DISALLOW_COPY_AND_ASSIGN(Timer); CORE_DISALLOW_COPY_AND_ASSIGN(Timer);
}; };

View File

@@ -81,9 +81,6 @@ Timer::Timer() : impl_(new Timer::Impl()) {
Timer::~Timer() { Timer::~Timer() {
if (IsRunning()) if (IsRunning())
Stop(); Stop();
delete impl_;
impl_ = NULL;
} }
bool Timer::Start(TimerHandler *handler, uint32_t time_in_secs) { bool Timer::Start(TimerHandler *handler, uint32_t time_in_secs) {