[vtkusers] Reference Count = 2 after Constuctor
Mike Jackson
imikejackson at gmail.com
Mon Apr 28 18:09:43 EDT 2008
I have a class that I am writing that inherits from
vtkPolyDataAlgorithm. After calling:
vtkH5PolyDataReader* reader = vtkH5PolyDataReader::New();
the reference count is 2. Shouldn't it be 1? I have another generic
class the inherits from vtkObject and running the same basic test
gives me a reference count of 1. What might be some reasons why my ref
count is 2? I think this is causing other problems in my code.
Here is my constructor:
vtkCxxRevisionMacro(vtkH5PolyDataReader, "1.0");
vtkStandardNewMacro(vtkH5PolyDataReader);
vtkH5PolyDataReader::vtkH5PolyDataReader()
{
this->FileName = NULL;
this->SetNumberOfInputPorts(0);
}
I also have the following in the header:
public:
static vtkH5PolyDataReader *New();
protected:
vtkH5PolyDataReader();
~ vtkH5PolyDataReader();
Thanks for any help on this.
--
Mike Jackson
imikejackson _at_ gee-mail dot com
More information about the vtkusers
mailing list