63 #ifndef vtkGarbageCollector_h
64 #define vtkGarbageCollector_h
66 #include "vtkCommonCoreModule.h"
74 VTK_ABI_NAMESPACE_BEGIN
83 class vtkObjectBaseToGarbageCollectorFriendship;
104 static void Collect();
126 static void DeferredCollectionPush();
127 static void DeferredCollectionPop();
135 static void SetGlobalDebugFlag(
bool flag);
136 static bool GetGlobalDebugFlag();
167 static void ClassInitialize();
168 static void ClassFinalize();
171 friend class vtkObjectBaseToGarbageCollectorFriendship;
173 static std::mutex* WeakPtrMutex();
176 virtual void Report(
vtkObjectBase* obj,
void* ptr,
const char* desc);
199 collector, ptr.Object, reinterpret_cast<void*>(&ptr.Object), desc);
211 VTK_ABI_NAMESPACE_END
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
friend class vtkGarbageCollector
Some classes need to clear the reference counts manually due to the way they work.
Detect and break reference loops.
a simple class to control print indentation
Manages the vtkGarbageCollector singleton.
abstract base class for most VTK objects
Non-templated superclass for vtkSmartPointer.
Allocate and hold a VTK object.
void VTKCOMMONCORE_EXPORT vtkGarbageCollectorReportInternal(vtkGarbageCollector *, vtkObjectBase *, void *, const char *)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void VTKCOMMONCORE_EXPORT vtkGarbageCollectorReport(vtkGarbageCollector *collector, vtkSmartPointerBase &ptr, const char *desc)
Function to report a reference held by a smart pointer to a collector.