Fix memory leak in TImer class.

This is not really important since the class is currently not used.

This is coverity issue 23291.
This commit is contained in:
Jean-Marc Lasgouttes 2015-02-20 15:39:45 +01:00
parent eb4f963eef
commit 3db4b23b3f
2 changed files with 9 additions and 0 deletions

View File

@ -158,6 +158,12 @@ Timer::Timer() : d(new Private)
}
Timer::~Timer()
{
delete d;
}
void Timer::restart()
{
time(&d->start_time);

View File

@ -68,8 +68,11 @@ private:
class Timer
{
public:
///
Timer();
///
~Timer();
///
void restart();
///
int elapsed() const;