vtkPolyData doesn't allocate memory for small arrays
I'm trying to create a vtkPolyData via vtkPolyData::Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000) to copy a small portion of inPolyData into it after. Initial vtkPolyData mostly consists of Polys (~10000) and only some Lines (~5).
As I only need a small portion of data to copy, numCells given is ~10 so ratio (static_cast(numCells) / inPolyData->GetNumberOfCells()) given to AllocateProportional is a value really close to 0. Thus further value given to AllocateExact - static_cast(lines->GetNumberOfCells() * ratio is being rounded to 0 too and initCellArray just doesn't allocate memory for Lines array at all. So when I'm trying to copy a Line from initial vtkPolyData to the new one later on it causes an exception.
Is that a bug or this Allocate is not intended to be used that way and another instance should be used?