diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-30 22:18:03 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-30 22:18:03 +0000 |
commit | a479078c9f8ff4c0c17c679468298f61c19230d9 (patch) | |
tree | c185e1bc56840640bb1944f776499c6ffaa1dc0f /docs/tutorials/013/mld.h | |
parent | dd4501a0f6706b945705b7640d212ef444c3c68e (diff) | |
download | ATCD-pre_pluggable_av_merge.tar.gz |
This commit was manufactured by cvs2svn to create tagpre_pluggable_av_merge
'pre_pluggable_av_merge'.
Diffstat (limited to 'docs/tutorials/013/mld.h')
-rw-r--r-- | docs/tutorials/013/mld.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/docs/tutorials/013/mld.h b/docs/tutorials/013/mld.h deleted file mode 100644 index 015b1a77eaa..00000000000 --- a/docs/tutorials/013/mld.h +++ /dev/null @@ -1,49 +0,0 @@ - -// $Id$ - -#ifndef MLD_H -#define MLD_H - -#include "ace/Synch.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Singleton.h" - -/* - This is a cheap memory leak detector. Each class I want to watch over - contains an mld object. The mld object's ctor increments a global counter - while the dtor decrements it. If the counter is non-zero when the program - is ready to exit then there may be a leak. - */ - -class mld -{ -public: - mld (void); - ~mld (void); - - static int value (void); - -protected: - static ACE_Atomic_Op < ACE_Mutex, int >counter_; -}; - -// ================================================ - -/* - Just drop 'MLD' anywhere in your class definition to get cheap memory leak - detection for your class. - */ -#define MLD mld mld_ - -/* - Use 'MLD_COUNTER' in main() to see if things are OK. - */ -#define MLD_COUNTER mld::value() - -// ================================================ - -#endif |