From 39b750e821488cad8e1f9fd27716e586fba3ae40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Mon, 24 May 2021 12:34:59 +0800 Subject: [PATCH] Avoid AppxManifest.xml leak release Com stream Object immediately Co-Authored-By: Andrey Nekrasov <1828123+yuyoyuppe@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs index 89d6dcc7d..e53fb7a52 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs @@ -17,6 +17,7 @@ using Flow.Launcher.Infrastructure; using Flow.Launcher.Plugin.Program.Logger; using Rect = System.Windows.Rect; using Flow.Launcher.Plugin.SharedModels; +using Flow.Launcher.Infrastructure.Logger; namespace Flow.Launcher.Plugin.Program.Programs { @@ -81,6 +82,11 @@ namespace Flow.Launcher.Plugin.Program.Programs Apps = new List().ToArray(); } + + if (Marshal.ReleaseComObject(stream) > 0) + { + Log.Error("Flow.Launcher.Plugin.Program.Programs.UWP", "AppxManifest.xml was leaked"); + } }