projects
/
vuplus_dvbapp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0c59a42
)
small refcounting fixes, add private operator delete to iObject
author
Andreas Monzner
<andreas.monzner@multimedia-labs.de>
Thu, 30 Oct 2008 00:14:17 +0000
(
00:14
+0000)
committer
Andreas Monzner
<andreas.monzner@multimedia-labs.de>
Thu, 30 Oct 2008 00:14:17 +0000
(
00:14
+0000)
lib/base/ebase.h
patch
|
blob
|
history
lib/base/object.h
patch
|
blob
|
history
lib/dvb/dvbtime.cpp
patch
|
blob
|
history
lib/dvb/dvbtime.h
patch
|
blob
|
history
lib/dvb/pmt.cpp
patch
|
blob
|
history
lib/dvb/pmt.h
patch
|
blob
|
history
lib/gdi/font.cpp
patch
|
blob
|
history
diff --git
a/lib/base/ebase.h
b/lib/base/ebase.h
index
c86c177
..
84845a9
100644
(file)
--- a/
lib/base/ebase.h
+++ b/
lib/base/ebase.h
@@
-155,7
+155,6
@@
private:
int requested; // requested events (POLLIN, ...)
void activate(int what) { /*emit*/ activated(what); }
eSocketNotifier(eMainloop *context, int fd, int req, bool startnow);
int requested; // requested events (POLLIN, ...)
void activate(int what) { /*emit*/ activated(what); }
eSocketNotifier(eMainloop *context, int fd, int req, bool startnow);
- void operator delete(void *pmem) { ::operator delete(pmem); }
public:
/**
* \brief Constructs a eSocketNotifier.
public:
/**
* \brief Constructs a eSocketNotifier.
@@
-281,7
+280,6
@@
class eTimer: iObject
void activate();
eTimer(eMainloop *context): context(*context), bActive(false) { }
void activate();
eTimer(eMainloop *context): context(*context), bActive(false) { }
- void operator delete(void *pmem) { ::operator delete(pmem); }
public:
/**
* \brief Constructs a timer.
public:
/**
* \brief Constructs a timer.
diff --git
a/lib/base/object.h
b/lib/base/object.h
index
f0e0e9a
..
a3268d4
100644
(file)
--- a/
lib/base/object.h
+++ b/
lib/base/object.h
@@
-17,6
+17,7
@@
private:
/* we don't allow the default operator here, as it would break the refcount. */
void operator=(const iObject &);
protected:
/* we don't allow the default operator here, as it would break the refcount. */
void operator=(const iObject &);
protected:
+ void operator delete(void *p) { ::operator delete(p); }
virtual ~iObject() { }
#ifdef SWIG
virtual void AddRef()=0;
virtual ~iObject() { }
#ifdef SWIG
virtual void AddRef()=0;
diff --git
a/lib/dvb/dvbtime.cpp
b/lib/dvb/dvbtime.cpp
index
4c5911c
..
83ca335
100644
(file)
--- a/
lib/dvb/dvbtime.cpp
+++ b/
lib/dvb/dvbtime.cpp
@@
-169,8
+169,6
@@
eDVBLocalTimeHandler::eDVBLocalTimeHandler()
eDVBLocalTimeHandler::~eDVBLocalTimeHandler()
{
instance=0;
eDVBLocalTimeHandler::~eDVBLocalTimeHandler()
{
instance=0;
- for (std::map<iDVBChannel*, channel_data>::iterator it=m_knownChannels.begin(); it != m_knownChannels.end(); ++it)
- delete it->second.tdt;
if (ready())
{
eDebug("set RTC to previous valid time");
if (ready())
{
eDebug("set RTC to previous valid time");
@@
-396,10
+394,8
@@
void eDVBLocalTimeHandler::updateTime( time_t tp_time, eDVBChannel *chan, int up
m_knownChannels.find(chan);
if ( it != m_knownChannels.end() )
{
m_knownChannels.find(chan);
if ( it != m_knownChannels.end() )
{
- TDT *prev_tdt = it->second.tdt;
- it->second.tdt = new TDT(chan, prev_tdt->getUpdateCount());
+ it->second.tdt = new TDT(chan, it->second.tdt->getUpdateCount());
it->second.tdt->startTimer(60*60*1000); // restart TDT for this transponder in 60min
it->second.tdt->startTimer(60*60*1000); // restart TDT for this transponder in 60min
- delete prev_tdt;
}
}
}
}
}
}
@@
-437,7
+433,6
@@
void eDVBLocalTimeHandler::DVBChannelStateChanged(iDVBChannel *chan)
break;
case iDVBChannel::state_release:
eDebug("[eDVBLocalTimerHandler] remove channel %p", chan);
break;
case iDVBChannel::state_release:
eDebug("[eDVBLocalTimerHandler] remove channel %p", chan);
- delete it->second.tdt;
m_knownChannels.erase(it);
break;
default: // ignore all other events
m_knownChannels.erase(it);
break;
default: // ignore all other events
diff --git
a/lib/dvb/dvbtime.h
b/lib/dvb/dvbtime.h
index
efb8596
..
f403ffd
100644
(file)
--- a/
lib/dvb/dvbtime.h
+++ b/
lib/dvb/dvbtime.h
@@
-49,7
+49,7
@@
class eDVBLocalTimeHandler: public Object
DECLARE_REF(eDVBLocalTimeHandler);
struct channel_data
{
DECLARE_REF(eDVBLocalTimeHandler);
struct channel_data
{
-
TDT *
tdt;
+
ePtr<TDT>
tdt;
ePtr<eDVBChannel> channel;
ePtr<eConnection> m_stateChangedConn;
int m_prevChannelState;
ePtr<eDVBChannel> channel;
ePtr<eConnection> m_stateChangedConn;
int m_prevChannelState;
diff --git
a/lib/dvb/pmt.cpp
b/lib/dvb/pmt.cpp
index
80fbcab
..
6082bf4
100644
(file)
--- a/
lib/dvb/pmt.cpp
+++ b/
lib/dvb/pmt.cpp
@@
-605,7
+605,6
@@
int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux,
if (ref.path.empty())
{
if (ref.path.empty())
{
- delete m_dvb_scan;
m_dvb_scan = new eDVBScan(m_channel, true, false);
m_dvb_scan->connectEvent(slot(*this, &eDVBServicePMTHandler::SDTScanEvent), m_scan_event_connection);
}
m_dvb_scan = new eDVBScan(m_channel, true, false);
m_dvb_scan->connectEvent(slot(*this, &eDVBServicePMTHandler::SDTScanEvent), m_scan_event_connection);
}
@@
-631,7
+630,6
@@
int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux,
void eDVBServicePMTHandler::free()
{
m_dvb_scan = 0;
void eDVBServicePMTHandler::free()
{
m_dvb_scan = 0;
- delete m_dvb_scan;
if (m_ca_servicePtr)
{
if (m_ca_servicePtr)
{
diff --git
a/lib/dvb/pmt.h
b/lib/dvb/pmt.h
index
d3a7faa
..
107b071
100644
(file)
--- a/
lib/dvb/pmt.h
+++ b/
lib/dvb/pmt.h
@@
-76,7
+76,7
@@
class eDVBServicePMTHandler: public Object
int m_last_channel_state;
eDVBCAService *m_ca_servicePtr;
int m_last_channel_state;
eDVBCAService *m_ca_servicePtr;
- e
DVBScan *
m_dvb_scan; // for sdt scan
+ e
Ptr<eDVBScan>
m_dvb_scan; // for sdt scan
eAUTable<eTable<ProgramMapSection> > m_PMT;
eAUTable<eTable<ProgramAssociationSection> > m_PAT;
eAUTable<eTable<ProgramMapSection> > m_PMT;
eAUTable<eTable<ProgramAssociationSection> > m_PAT;
diff --git
a/lib/gdi/font.cpp
b/lib/gdi/font.cpp
index
09154de
..
450269f
100644
(file)
--- a/
lib/gdi/font.cpp
+++ b/
lib/gdi/font.cpp
@@
-212,7
+212,6
@@
float fontRenderClass::getLineHeight(const gFont& font)
if (FTC_Manager_Lookup_Size(cacheManager, &fnt->font.font, ¤t_face, &fnt->size)<0)
#endif
{
if (FTC_Manager_Lookup_Size(cacheManager, &fnt->font.font, ¤t_face, &fnt->size)<0)
#endif
{
- delete fnt;
eDebug("FTC_Manager_Lookup_Size failed!");
return 0;
}
eDebug("FTC_Manager_Lookup_Size failed!");
return 0;
}