vtkObjectBase

Section: Visualization Toolkit Common Classes

Usage

vtkObjectBase is the base class for all reference counted classes in the VTK. These classes include vtkCommand classes, vtkInformationKey classes, and vtkObject classes.

vtkObjectBase performs reference counting: objects that are reference counted exist as long as another object uses them. Once the last reference to a reference counted object is removed, the object will spontaneously destruct.

Constructor and destructor of the subclasses of vtkObjectBase should be protected, so that only New() and UnRegister() actually call them. Debug leaks can be used to see if there are any objects left with nonzero reference count.

To create an instance of class vtkObjectBase, simply invoke its constructor as follows

  obj = vtkObjectBase

Methods

The class vtkObjectBase has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkObjectBase class.