65#ifndef vtkMemoryDescriptor_h
66#define vtkMemoryDescriptor_h
68#include "vtkCommonCoreModule.h"
72VTK_ABI_NAMESPACE_BEGIN
131 void Set(vtkTypeInt64 pointer, vtkTypeInt64 sizeInBytes,
const char* memorySpace,
132 const char* role =
"data");
229 void ClearOwnership();
a simple class to control print indentation
void * GetReleaseContext() const
The release callback and its context, or nullptr if none is held.
vtkTypeInt64 GetReleaseContextAddress() const
The release callback and its context as integers, for wrapped callers.
bool TakeRelease(ReleaseFunction &release, void *&context)
Hand the release duty to the caller.
void Set(vtkTypeInt64 pointer, vtkTypeInt64 sizeInBytes, const char *memorySpace, const char *role="data")
Convenience: set the description in one call.
void SetOwner(vtkObject *owner)
Keep a VTK object alive for as long as this descriptor lives.
void(*)(void *context) ReleaseFunction
Signature of a release callback.
ReleaseFunction GetRelease() const
The release callback and its context, or nullptr if none is held.
void SetRelease(ReleaseFunction release, void *context)
Keep non-VTK memory alive by holding a release callback.
vtkTypeInt64 GetReleaseAddress() const
The release callback and its context as integers, for wrapped callers.
void SetReleaseAddress(vtkTypeInt64 release, vtkTypeInt64 context)
As SetRelease(), taking both addresses as integers.
~vtkMemoryDescriptor() override
bool HasOwnership() const
Whether this descriptor currently keeps the memory alive.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkMemoryDescriptor * New()