layers: hold UO dispatch tables by value in layer_data
Trims out some allocations; fixes leak of dispatch tables
diff --git a/layers/unique_objects.h b/layers/unique_objects.h
index 76420a6..f90c5bf 100644
--- a/layers/unique_objects.h
+++ b/layers/unique_objects.h
@@ -46,7 +46,7 @@
debug_report_data *report_data;
std::vector<VkDebugReportCallbackEXT> logging_callback;
- VkLayerInstanceDispatchTable *dispatch_table;
+ VkLayerInstanceDispatchTable dispatch_table = {};
// The following are for keeping track of the temporary callbacks that can
// be used in vkCreateInstance and vkDestroyInstance:
@@ -65,7 +65,7 @@
VkInstance instance;
debug_report_data *report_data;
- VkLayerDispatchTable *dispatch_table;
+ VkLayerDispatchTable dispatch_table = {};
std::unordered_map<uint64_t, std::unique_ptr<TEMPLATE_STATE>> desc_template_map;