From 0c59a4279f93f08fe95fca5f2e55f3e025f0cceb Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Wed, 29 Oct 2008 22:44:53 +0000 Subject: also use refcounting for eTimers its now no more possible directly to call new eTimer .. or to embedded eTimer. to create a eTimer now eTimer::create must be used... to delete you must call ->AddRef() after timer creation and ->Release when the timer is no more needed. Or use ePtr to store the timer reference.. then its enough to set the ePtr object to 0 when the timer is no more needed --- lib/dvb/esection.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/dvb/esection.cpp') diff --git a/lib/dvb/esection.cpp b/lib/dvb/esection.cpp index 8ec07901..28e37cbc 100644 --- a/lib/dvb/esection.cpp +++ b/lib/dvb/esection.cpp @@ -50,7 +50,7 @@ void eGTable::timeout() } eGTable::eGTable(bool debug): - m_timeout(0), m_debug(debug), error(0) + m_debug(debug), error(0) { } @@ -130,9 +130,7 @@ RESULT eGTable::start(iDVBSectionReader *reader, const eDVBTableSpec &table) if (m_table.flags & eDVBTableSpec::tfHaveTimeout) { - if (m_timeout) - delete m_timeout; - m_timeout = new eTimer(eApp); + m_timeout = eTimer::create(eApp); m_timeout->start(m_table.timeout, 1); // begin timeout CONNECT(m_timeout->timeout, eGTable::timeout); } @@ -152,8 +150,6 @@ RESULT eGTable::start(iDVBDemux *demux, const eDVBTableSpec &table) eGTable::~eGTable() { - if (m_timeout) - delete m_timeout; } void eAUGTable::slotTableReady(int error) -- cgit v1.2.3