aboutsummaryrefslogtreecommitdiff
path: root/src/instance_context.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/instance_context.cc')
-rw-r--r--src/instance_context.cc9
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