Common/vtkDebugLeaks.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00048 #ifndef __vtkDebugLeaks_h
00049 #define __vtkDebugLeaks_h
00050
00051 #include "vtkObject.h"
00052
00053 #include "vtkToolkits.h"
00054 #include "vtkDebugLeaksManager.h"
00055
00056 class vtkDebugLeaksHashTable;
00057 class vtkSimpleCriticalSection;
00058
00059 class VTK_COMMON_EXPORT vtkDebugLeaks : public vtkObject
00060 {
00061 public:
00062 static vtkDebugLeaks *New();
00063 vtkTypeRevisionMacro(vtkDebugLeaks,vtkObject);
00064
00066 static void ConstructClass(const char* classname);
00067
00069 static void DestructClass(const char* classname);
00070
00072 static void PrintCurrentLeaks();
00073
00075
00077 static void PromptUserOn() {}
00078 static void PromptUserOff() {}
00080
00081 protected:
00082 vtkDebugLeaks(){};
00083 virtual ~vtkDebugLeaks(){};
00084
00085 static int DisplayMessageBox(const char*);
00086
00087 static void ClassInitialize();
00088 static void ClassFinalize();
00089
00090
00091 friend class vtkDebugLeaksManager;
00092
00093
00094 private:
00095 static vtkDebugLeaksHashTable* MemoryTable;
00096 static vtkSimpleCriticalSection* CriticalSection;
00097 private:
00098 vtkDebugLeaks(const vtkDebugLeaks&);
00099 void operator=(const vtkDebugLeaks&);
00100 };
00101
00102 #endif // __vtkDebugLeaks_h