Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkDebugLeaks.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDebugLeaks.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00035 #ifndef __vtkDebugLeaks_h 00036 #define __vtkDebugLeaks_h 00037 00038 #include "vtkObject.h" 00039 00040 #include "vtkToolkits.h" // Needed for VTK_DEBUG_LEAKS macro setting. 00041 #include "vtkDebugLeaksManager.h" // Needed for proper singleton initialization 00042 00043 class vtkDebugLeaksHashTable; 00044 class vtkSimpleCriticalSection; 00045 00046 class VTK_COMMON_EXPORT vtkDebugLeaks : public vtkObject 00047 { 00048 public: 00049 static vtkDebugLeaks *New(); 00050 vtkTypeRevisionMacro(vtkDebugLeaks,vtkObject); 00051 00053 static void ConstructClass(const char* classname); 00054 00056 static void DestructClass(const char* classname); 00057 00059 static void PrintCurrentLeaks(); 00060 00062 00064 static void PromptUserOn() {} 00065 static void PromptUserOff() {} 00067 00068 protected: 00069 vtkDebugLeaks(){}; 00070 virtual ~vtkDebugLeaks(){}; 00071 00072 static int DisplayMessageBox(const char*); 00073 00074 static void ClassInitialize(); 00075 static void ClassFinalize(); 00076 00077 //BTX 00078 friend class vtkDebugLeaksManager; 00079 //ETX 00080 00081 private: 00082 static vtkDebugLeaksHashTable* MemoryTable; 00083 static vtkSimpleCriticalSection* CriticalSection; 00084 private: 00085 vtkDebugLeaks(const vtkDebugLeaks&); // Not implemented. 00086 void operator=(const vtkDebugLeaks&); // Not implemented. 00087 }; 00088 00089 #endif // __vtkDebugLeaks_h