Commit d89beeaa authored by Charles Law's avatar Charles Law
Browse files

Actual memory size should be array size not used size.

parent 3f57c39b
......@@ -33,7 +33,7 @@
#include "vtkIdList.h"
#include "vtkMath.h"
vtkCxxRevisionMacro(vtkDataArray, "1.53");
vtkCxxRevisionMacro(vtkDataArray, "1.54");
// Construct object with default tuple dimension (number of components) of 1.
vtkDataArray::vtkDataArray(vtkIdType numComp)
......@@ -575,7 +575,9 @@ unsigned long vtkDataArray::GetActualMemorySize()
{
unsigned long numPrims;
float size = 0.0;
numPrims = this->GetNumberOfTuples() * this->GetNumberOfComponents();
// The allocated array may be larger than the number of primatives used.
//numPrims = this->GetNumberOfTuples() * this->GetNumberOfComponents();
numPrims = this->GetSize();
switch (this->GetDataType())
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment