2021222324252627282930
synchronized (PointerToReference) { while (iter.hasNext()) { WeakReference value = (WeakReference)iter.next(); vtkObjectBase obj = (vtkObjectBase)value.get(); if (obj != null) { obj.Delete(); } } } } }