vtkIdList allocation method (Allocate) doesn't initialize NumberOfIds
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Hi,
I am not sure if this a bug, but NumberOfIds has not been set by calling Allocate() method. //------------------------------------------------------------------------------ int vtkIdList::Allocate(const int sz, const int vtkNotUsed(strategy)) { ... this->NumberOfIds = 0; // Why 0, but not sz??? }
I've to use it this way:
vtkIdList *idList = vtkIdList::New(); idList->Allocate(numIds); idList->SetNumberOfIds(numIds); // Why do I need to call it.
Is it correct? Thanks,
-Denis.