reference counts..

K.R.Subramanian krs at zappa.uncc.edu
Thu Jun 1 00:30:13 EDT 2000


I do the following...

    vtkVectorText* v = vtkVectorText::New();

I check the reference count of this object - I expect this to be 1, but
its actually 2. I tried it with vtkStructuredPoints and its 1, as it
should be.'

I checked this with the debugger, as well as printed it out using
GetReferenceCount() method
of the object.

I am puzzled.

I am trying to make sure I am deleting objects after creating the
pipeline
(as the app repeatedly can read in new data files). Is there any simple
way to check  this (other than carefully goign through the code -:) ? .
It would
be nice to have a vtk class that would record all objects created and
would
have a method to print out the reference counts  of all objects (for
instance before reading
in new dataset, which would require some cleanup of the existing vtk
objects).

Things we need to worry about when we are building robust applications..

Wishful thinking?

    -- krs

--
K.R.Subramanian                           Phone: (704) 547-4872
Department of Computer Science            FAX:   (704) 547-3516
UNC Charlotte, 228A Kennedy
9201 Univ. City Blvd.                     Email: krs at cs.uncc.edu
Charlotte, NC 28223-0001                  WWW: http://www.cs.uncc.edu/~krs


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20000601/1f7de78b/attachment.html>


More information about the vtkusers mailing list