Skip to content
Snippets Groups Projects
Commit 6f54b402 authored by David Gobbi's avatar David Gobbi
Browse files

Avoid leaks by hinting NewIterator methods

The iterator objects returned by vtkDataSet and derived classes
were leaking in the Python wrappers.  This patch adds hints so
that Python knows that it has to take ownership of these objects.
parent 3768b398
Branches
No related tags found
No related merge requests found
......@@ -103,6 +103,7 @@ public:
/**
* Return an iterator that traverses the cells in this data set.
*/
VTK_NEWINSTANCE
virtual vtkCellIterator* NewCellIterator();
/**
......
......@@ -202,6 +202,7 @@ public:
* Create an empty cell iterator. The user is responsible for deleting it.
* \post result_exists: result!=0
*/
VTK_NEWINSTANCE
virtual vtkGenericCellIterator *NewCellIterator()=0;
/**
......
......@@ -123,6 +123,7 @@ public:
* \pre valid_dim_range: (dim>=-1) && (dim<=3)
* \post result_exists: result!=0
*/
VTK_NEWINSTANCE
virtual vtkGenericCellIterator *NewCellIterator(int dim=-1) = 0;
/**
......@@ -134,6 +135,7 @@ public:
* \pre valid_dim_range: (dim>=-1) && (dim<=2)
* \post result_exists: result!=0
*/
VTK_NEWINSTANCE
virtual vtkGenericCellIterator *NewBoundaryIterator(int dim=-1,
int exteriorOnly=0) = 0;
......@@ -143,6 +145,7 @@ public:
* The user is responsible for deleting the iterator.
* \post result_exists: result!=0
*/
VTK_NEWINSTANCE
virtual vtkGenericPointIterator *NewPointIterator()=0;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment