From 0675b9f7f3cd66c92d9babd1ccee2dcc47bdfafc Mon Sep 17 00:00:00 2001 From: Martin Nowack <martin@se.inf.tu-dresden.de> Date: Tue, 15 Jan 2013 11:08:33 +0100 Subject: Fix timer leak --- lib/Core/ExecutorTimers.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'lib/Core/ExecutorTimers.cpp') diff --git a/lib/Core/ExecutorTimers.cpp b/lib/Core/ExecutorTimers.cpp index 6a5314ca..06fd4be7 100644 --- a/lib/Core/ExecutorTimers.cpp +++ b/lib/Core/ExecutorTimers.cpp @@ -13,6 +13,7 @@ #include "Executor.h" #include "PTree.h" #include "StatsTracker.h" +#include "ExecutorTimerInfo.h" #include "klee/ExecutionState.h" #include "klee/Internal/Module/InstructionInfoTable.h" @@ -93,7 +94,7 @@ void Executor::initTimers() { } if (MaxTime) { - addTimer(new HaltTimer(this), MaxTime); + addTimer(new HaltTimer(this), MaxTime.getValue()); } } @@ -103,23 +104,6 @@ Executor::Timer::Timer() {} Executor::Timer::~Timer() {} -class Executor::TimerInfo { -public: - Timer *timer; - - /// Approximate delay per timer firing. - double rate; - /// Wall time for next firing. - double nextFireTime; - -public: - TimerInfo(Timer *_timer, double _rate) - : timer(_timer), - rate(_rate), - nextFireTime(util::getWallTime() + rate) {} - ~TimerInfo() { delete timer; } -}; - void Executor::addTimer(Timer *timer, double rate) { timers.push_back(new TimerInfo(timer, rate)); } -- cgit 1.4.1