diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-08-17 13:13:53 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-08-17 13:13:53 +0000 |
| commit | 3f7b163cb754f07ffbf8279a9b8e9f3c8daf526c (patch) | |
| tree | c9778095ea7e277df6b34444a9638ff7e532d72b /lib/base/object.h | |
| parent | 3a495d5492def362b21378565aef91f15c9325a6 (diff) | |
| download | enigma2-3f7b163cb754f07ffbf8279a9b8e9f3c8daf526c.tar.gz enigma2-3f7b163cb754f07ffbf8279a9b8e9f3c8daf526c.zip | |
fix memleak check
cleanup
Diffstat (limited to 'lib/base/object.h')
| -rw-r--r-- | lib/base/object.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/base/object.h b/lib/base/object.h index d0e2a65e..7f823223 100644 --- a/lib/base/object.h +++ b/lib/base/object.h @@ -31,9 +31,13 @@ public: volatile int count; oRefCount(): count(0) { } operator volatile int&() { return count; } - ~oRefCount() { + ~oRefCount() + { #ifdef OBJECT_DEBUG - if (count) eDebug("OBJECT_DEBUG FATAL: %p has %d references!", this, count); else eDebug("OBJECT_DEBUG refcount ok! (%p)", this); + if (count) + eDebug("OBJECT_DEBUG FATAL: %p has %d references!", this, count); + else + eDebug("OBJECT_DEBUG refcount ok! (%p)", this); #endif } }; @@ -139,6 +143,7 @@ public: delete this; \ } #else + #warning use non optimized implementation of refcounting. #define DECLARE_REF(x) \ private:oRefCount ref; \ eSingleLock ref_lock; \ |
