21class ObjectInstanceRegistry {
54 const void *introspection_helper);
68 static ObjectInstanceRegistry &get_registry();
71 void *subject_ptr =
nullptr;
74 bool registered_for_introspection =
false;
76 InstanceInfo() =
default;
77 InstanceInfo(
size_t size,
Kind kind,
void *subject_ptr,
bool registered_for_introspection)
78 : subject_ptr(subject_ptr), size(size), kind(kind), registered_for_introspection(registered_for_introspection) {
83 std::map<uintptr_t, InstanceInfo> instances;
85 ObjectInstanceRegistry() =
default;
89 ObjectInstanceRegistry &
operator=(
const ObjectInstanceRegistry &) =
delete;
91 ObjectInstanceRegistry &
operator=(ObjectInstanceRegistry &&) =
delete;
static void register_instance(void *this_ptr, size_t size, Kind kind, void *subject_ptr, const void *introspection_helper)
Add an instance to the registry.