Skip to content

Proposal: storage type allocation signal #1266

@pgruenbacher

Description

@pgruenbacher

It'd be nice if we had a signal that was published from registry

like so:
b9d10ad

Allows for logging warnings if storage allocation occurs during runtime after the registry has already been reserved.

void handleStorageAllocated(entt::id_type id) {

  if (auto t = entt::resolve(id)) {
    SPDLOG_ERROR("Allocated storage? {}", t.info().name());
  } else {
    SPDLOG_ERROR("Allocated storage? {}", id);
  }
}
registry.on_storage_allocated().connect<&handleStorageAllocated>();

Metadata

Metadata

Assignees

Labels

triagepending issue, PR or whatever

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions