diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-24 19:02:10 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-24 19:02:10 +0000 |
commit | eef5b7ca85a3842950948fccca42a3b83c84ff75 (patch) | |
tree | f0cefdf50cecee81338f319ea19608d49cf3898a /docs/tutorials/013/mld.h | |
parent | 07e8a1d00d1e2ab1c2b47e3698886f1512bcf03a (diff) | |
download | ATCD-pluggable_av_start.tar.gz |
This commit was manufactured by cvs2svn to create tagpluggable_av_start
'pluggable_av_start'.
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 |