00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkDebugLeaks_h
00032 #define __vtkDebugLeaks_h
00033
00034 #include "vtkObject.h"
00035
00036 #include "vtkToolkits.h"
00037 #include "vtkDebugLeaksManager.h"
00038
00039 class vtkDebugLeaksHashTable;
00040 class vtkSimpleCriticalSection;
00041
00042 class VTK_COMMON_EXPORT vtkDebugLeaks : public vtkObject
00043 {
00044 public:
00045 static vtkDebugLeaks *New();
00046 vtkTypeMacro(vtkDebugLeaks,vtkObject);
00047
00049 static void ConstructClass(const char* classname);
00050
00052 static void DestructClass(const char* classname);
00053
00056 static int PrintCurrentLeaks();
00057
00059
00061 VTK_LEGACY(static void PromptUserOn());
00062 VTK_LEGACY(static void PromptUserOff());
00064
00066
00068 static int GetExitError();
00069 static void SetExitError(int);
00071
00072 protected:
00073 vtkDebugLeaks(){};
00074 virtual ~vtkDebugLeaks(){};
00075
00076 static int DisplayMessageBox(const char*);
00077
00078 static void ClassInitialize();
00079 static void ClassFinalize();
00080
00081
00082 friend class vtkDebugLeaksManager;
00083
00084
00085 private:
00086 static vtkDebugLeaksHashTable* MemoryTable;
00087 static vtkSimpleCriticalSection* CriticalSection;
00088 static int ExitError;
00089
00090 vtkDebugLeaks(const vtkDebugLeaks&);
00091 void operator=(const vtkDebugLeaks&);
00092 };
00093
00094 #endif // __vtkDebugLeaks_h