@@ -175,7 +175,7 @@ struct state_vulkan_sdl3 {
175175 // Use raw pointers because std::unique_ptr might not have standard layout
176176 vkd::VulkanDisplay* vulkan = nullptr ;
177177 WindowCallback* window_callback = nullptr ;
178- FrameMappings* frame_mappings = new FrameMappings() ;
178+ FrameMappings frame_mappings;
179179
180180 std::atomic<bool > should_exit = false ;
181181 video_desc current_desc{};
@@ -190,9 +190,7 @@ struct state_vulkan_sdl3 {
190190 state_vulkan_sdl3 (state_vulkan_sdl3&& other) = delete ;
191191 state_vulkan_sdl3& operator =(state_vulkan_sdl3&& other) = delete ;
192192
193- ~state_vulkan_sdl3 () {
194- delete frame_mappings;
195- }
193+ ~state_vulkan_sdl3 () = default ;
196194};
197195
198196constexpr std::pair<int64_t , std::string_view> display_vulkan_keybindings[] = {
@@ -933,7 +931,7 @@ video_frame* display_vulkan_getf(void* state) {
933931 image = s->vulkan ->acquire_image (to_vkd_image_desc (desc, *s));
934932 }
935933 catch (std::exception& e) { log_and_exit_uv (e); return nullptr ; }
936- video_frame& frame = *s->frame_mappings -> create_frame (image);
934+ video_frame& frame = *s->frame_mappings . create_frame (image);
937935
938936 update_description (desc, frame);
939937 frame.tiles [0 ].data_len = image.get_row_pitch () * image.get_size ().height ;
@@ -950,7 +948,7 @@ bool display_vulkan_putf(void* state, video_frame* frame, long long timeout_ns)
950948 return true ;
951949 }
952950
953- vkd::TransferImage image = s->frame_mappings -> get_image (frame);
951+ vkd::TransferImage image = s->frame_mappings . get_image (frame);
954952
955953 if (timeout_ns == PUTF_DISCARD) {
956954 try {
0 commit comments