From 4bc08995411e21f3564f09e136809be68ddf96a8 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Mon, 31 Jan 2005 22:51:14 +0000 Subject: - fixed dvb scan - fixed dvbdb (reading/writing lamedb) - fixed (i.e. disallow) operator= in iObject (destroyed refcounts before) - implemented listboxcontent for servicelists - implemented getServiceInformation for non-playing services (still not happy with the result, though) - implemented first try of serviceSelector component --- lib/base/object.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/base/object.h') diff --git a/lib/base/object.h b/lib/base/object.h index ddb4512c..64d9a88f 100644 --- a/lib/base/object.h +++ b/lib/base/object.h @@ -14,6 +14,11 @@ typedef int RESULT; class iObject { +private: + /* we don't allow the default operator here, as it would break the refcount. */ + void operator=(const iObject &); +protected: + virtual ~iObject() { } public: virtual void AddRef()=0; virtual void Release()=0; @@ -25,6 +30,11 @@ class oRefCount public: oRefCount(): ref(0) { } operator int&() { return ref; } + ~oRefCount() { +#ifdef OBJECT_DEBUG + if (ref) eDebug("OBJECT_DEBUG FATAL: %p has %d references!", this, ref); else eDebug("OBJECT_DEBUG refcount ok! (%p)", this); +#endif + } }; #define DECLARE_REF private: oRefCount ref; public: void AddRef(); void Release(); -- cgit v1.2.3