ActiViz .NET  5.8.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions | Static Private Member Functions
Kitware.VTK.vtkHeap Class Reference

vtkHeap - replacement for malloc/free and new/delete More...

Inheritance diagram for Kitware.VTK.vtkHeap:
[legend]
Collaboration diagram for Kitware.VTK.vtkHeap:
[legend]

List of all members.

Public Member Functions

 vtkHeap (IntPtr rawCppThis, bool callDisposalMethod, bool strong)
 Automatically generated constructor - called from generated code. DO NOT call directly.
 vtkHeap ()
 Undocumented Block.
IntPtr AllocateMemory (uint n)
 Allocate the memory requested.
virtual uint GetBlockSize ()
 Set/Get the size at which blocks are allocated. If a memory request is bigger than the block size, then that size will be allocated.
virtual int GetNumberOfAllocations ()
 Get the number of allocations thus far.
virtual int GetNumberOfBlocks ()
 Get the number of allocations thus far.
override int IsA (string type)
 Undocumented Block.
new vtkHeap NewInstance ()
 Undocumented Block.
void Reset ()
 This methods resets the current allocation location back to the beginning of the heap. This allows reuse of previously allocated memory which may be beneficial to performance in many cases.
virtual void SetBlockSize (uint arg0)
 Set/Get the size at which blocks are allocated. If a memory request is bigger than the block size, then that size will be allocated.
string StringDup (string str)
 Convenience method performs string duplication.

Static Public Member Functions

static new vtkHeap New ()
 Undocumented Block.
static new int IsTypeOf (string type)
 Undocumented Block.
static new vtkHeap SafeDownCast (vtkObjectBase o)
 Undocumented Block.

Public Attributes

new const string MRFullTypeName = "Kitware.VTK.vtkHeap"
 Automatically generated type registration mechanics.

Static Public Attributes

static new readonly string MRClassNameKey = "7vtkHeap"
 Automatically generated type registration mechanics.

Protected Member Functions

override void Dispose (bool disposing)
 Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.

Private Member Functions

static internal IntPtr vtkHeap_New (ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal IntPtr vtkHeap_AllocateMemory_01 (HandleRef pThis, uint n)
static internal uint vtkHeap_GetBlockSize_02 (HandleRef pThis)
static internal int vtkHeap_GetNumberOfAllocations_03 (HandleRef pThis)
static internal int vtkHeap_GetNumberOfBlocks_04 (HandleRef pThis)
static internal int vtkHeap_IsA_05 (HandleRef pThis, string type)
static internal int vtkHeap_IsTypeOf_06 (string type)
static internal IntPtr vtkHeap_NewInstance_08 (HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal void vtkHeap_Reset_09 (HandleRef pThis)
static internal IntPtr vtkHeap_SafeDownCast_10 (HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal void vtkHeap_SetBlockSize_11 (HandleRef pThis, uint arg0)
static internal IntPtr vtkHeap_StringDup_12 (HandleRef pThis, string str)

Static Private Member Functions

static vtkHeap ()
 Automatically generated type registration mechanics.

Detailed Description

vtkHeap - replacement for malloc/free and new/delete

Description This class is a replacement for malloc/free and new/delete for software that has inherent memory leak or performance 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. The class vtkOrderedTriangulator may create and delete millions of new/delete calls. This class allows the overloading of the C++ new operator (or other memory allocation requests) by using the method AllocateMemory(). Memory is deleted with an invocation of CleanAll() (which deletes ALL memory; any given memory allocation cannot be deleted). Note: a block size can be used to control the size of each memory allocation. Requests for memory are fulfilled from the block until the block runs out, then a new block is created.

Caveats Do not use this class as a general 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. Also, deleting memory from vtkHeap is not supported. Only the deletion of the entire heap is. (A Reset() method allows you to reuse previously allocated memory.)


Constructor & Destructor Documentation

static Kitware.VTK.vtkHeap.vtkHeap ( ) [static, private]

Automatically generated type registration mechanics.

Kitware.VTK.vtkHeap.vtkHeap ( IntPtr  rawCppThis,
bool  callDisposalMethod,
bool  strong 
)

Automatically generated constructor - called from generated code. DO NOT call directly.

Undocumented Block.


Member Function Documentation

Allocate the memory requested.

override void Kitware.VTK.vtkHeap.Dispose ( bool  disposing) [protected]

Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.

Reimplemented from Kitware.VTK.vtkObject.

virtual uint Kitware.VTK.vtkHeap.GetBlockSize ( ) [virtual]

Set/Get the size at which blocks are allocated. If a memory request is bigger than the block size, then that size will be allocated.

virtual int Kitware.VTK.vtkHeap.GetNumberOfAllocations ( ) [virtual]

Get the number of allocations thus far.

virtual int Kitware.VTK.vtkHeap.GetNumberOfBlocks ( ) [virtual]

Get the number of allocations thus far.

override int Kitware.VTK.vtkHeap.IsA ( string  type) [virtual]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

static new int Kitware.VTK.vtkHeap.IsTypeOf ( string  type) [static]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

static new vtkHeap Kitware.VTK.vtkHeap.New ( ) [static]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

This methods resets the current allocation location back to the beginning of the heap. This allows reuse of previously allocated memory which may be beneficial to performance in many cases.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Here is the call graph for this function:

virtual void Kitware.VTK.vtkHeap.SetBlockSize ( uint  arg0) [virtual]

Set/Get the size at which blocks are allocated. If a memory request is bigger than the block size, then that size will be allocated.

string Kitware.VTK.vtkHeap.StringDup ( string  str)

Convenience method performs string duplication.

static internal IntPtr Kitware.VTK.vtkHeap.vtkHeap_AllocateMemory_01 ( HandleRef  pThis,
uint  n 
) [private]
static internal uint Kitware.VTK.vtkHeap.vtkHeap_GetBlockSize_02 ( HandleRef  pThis) [private]
static internal int Kitware.VTK.vtkHeap.vtkHeap_GetNumberOfAllocations_03 ( HandleRef  pThis) [private]
static internal int Kitware.VTK.vtkHeap.vtkHeap_GetNumberOfBlocks_04 ( HandleRef  pThis) [private]
static internal int Kitware.VTK.vtkHeap.vtkHeap_IsA_05 ( HandleRef  pThis,
string  type 
) [private]
static internal int Kitware.VTK.vtkHeap.vtkHeap_IsTypeOf_06 ( string  type) [private]
static internal IntPtr Kitware.VTK.vtkHeap.vtkHeap_New ( ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal IntPtr Kitware.VTK.vtkHeap.vtkHeap_NewInstance_08 ( HandleRef  pThis,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal void Kitware.VTK.vtkHeap.vtkHeap_Reset_09 ( HandleRef  pThis) [private]
static internal IntPtr Kitware.VTK.vtkHeap.vtkHeap_SafeDownCast_10 ( HandleRef  o,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal void Kitware.VTK.vtkHeap.vtkHeap_SetBlockSize_11 ( HandleRef  pThis,
uint  arg0 
) [private]
static internal IntPtr Kitware.VTK.vtkHeap.vtkHeap_StringDup_12 ( HandleRef  pThis,
string  str 
) [private]

Member Data Documentation

new readonly string Kitware.VTK.vtkHeap.MRClassNameKey = "7vtkHeap" [static]

Automatically generated type registration mechanics.

Reimplemented from Kitware.VTK.vtkObject.

new const string Kitware.VTK.vtkHeap.MRFullTypeName = "Kitware.VTK.vtkHeap"

Automatically generated type registration mechanics.

Reimplemented from Kitware.VTK.vtkObject.


The documentation for this class was generated from the following file: