Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
vtkHeap Class Reference
#include <vtkHeap.h>
Inheritance diagram for vtkHeap:
[legend]Collaboration diagram for vtkHeap:
[legend]List of all members.
Detailed Description
replacement for malloc/free and new/delete
- Date:
-
2002/06/13 08:41:32
- Revision:
-
1.9
This class is a replacement for malloc/free and new/delete for software that has inherent memory leak problems. For example, external software such as the PLY library (vtkPLY) and VRML importer (vtkVRMLImporter) are often written with lots of malloc() calls but without the corresponding free() invocations. This class allows the replacement of malloc() with the method AllocateMemory(). Memory is then deleted with an invocation of CleanUp().
- Warning:
-
Do not use this method as a replacement for system memory allocation. This class should be used only as a last resort if memory leaks cannot be tracked down and eliminated by conventional means.
- See also:
-
vtkVRMLImporter vtkPLY
- Created by:
-
- CVS contributions (if > 5%):
-
- CVS logs (CVSweb):
-
- .
h
(/Common/vtkHeap.h)
- .
cxx
(/Common/vtkHeap.cxx)
Definition at line 64 of file vtkHeap.h.
Member Typedef Documentation
Constructor & Destructor Documentation
vtkHeap::vtkHeap |
( |
|
) |
[protected] |
|
vtkHeap::~vtkHeap |
( |
|
) |
[protected] |
|
Member Function Documentation
vtkHeap* vtkHeap::New |
( |
|
) |
[static] |
|
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject. |
virtual const char* vtkHeap::GetClassName |
( |
|
) |
[virtual] |
|
int vtkHeap::IsTypeOf |
( |
const char * |
type |
) |
[static] |
|
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject. |
virtual int vtkHeap::IsA |
( |
const char * |
type |
) |
[virtual] |
|
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject. |
vtkHeap* vtkHeap::SafeDownCast |
( |
vtkObject * |
o |
) |
[static] |
|
void vtkHeap::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
[virtual] |
|
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkObject. |
void* vtkHeap::AllocateMemory |
( |
size_t |
n |
) |
|
|
|
Allocate the memory requested. |
char* vtkHeap::StringDup |
( |
const char * |
str |
) |
|
|
|
Convenience method performs string duplication. |
virtual int vtkHeap::GetNumberOfAllocations |
( |
|
) |
[virtual] |
|
|
Get the number of allocations thus far. |
void vtkHeap::CleanAll |
( |
|
) |
[protected] |
|
Member Data Documentation
int vtkHeap::NumberOfAllocations [protected]
|
|
The documentation for this class was generated from the following file: