Skip to content

Commit

Permalink
fix: ensure com cleanup is run
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Jan 28, 2025
1 parent d574060 commit f537e51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/wm-platform/src/com.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ impl Default for ComInit {

impl Drop for ComInit {
fn drop(&mut self) {
// Explicitly drop COM interfaces first.
drop(self.taskbar_list.take());
drop(self.application_view_collection.take());
drop(self.service_provider.take());

unsafe { CoUninitialize() };
}
}
Expand Down

0 comments on commit f537e51

Please sign in to comment.