diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-02-11 23:19:15 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-02-11 23:19:15 +1100 |
| commit | 76f3ef1d7c2b4393a8e8b402deb924e606448d27 (patch) | |
| tree | a291bec0544f007536a41ec1f590338aee1163e9 /src/instance_context.cc | |
| parent | 77e2be172718878b38999efc247ce7571435fcc8 (diff) | |
More cleanup, fix lifetime and mutex issues
Diffstat (limited to 'src/instance_context.cc')
| -rw-r--r-- | src/instance_context.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/instance_context.cc b/src/instance_context.cc index 36d2c66..d12766f 100644 --- a/src/instance_context.cc +++ b/src/instance_context.cc @@ -1,5 +1,6 @@ #include "instance_context.hh" +#include <cassert> #include <utility> namespace low_latency { @@ -8,6 +9,12 @@ InstanceContext::InstanceContext(const VkInstance& instance, VkuInstanceDispatchTable&& vtable) : instance(instance), vtable(std::move(vtable)) {} -InstanceContext::~InstanceContext() {} +InstanceContext::~InstanceContext() { + // Similar to devices, we should own the only shared ptr at this point so + // they destruct now. + for (const auto& [device, device_context] : this->phys_devices) { + assert(device_context.unique()); + } +} } // namespace low_latency
\ No newline at end of file |
