Skip to content

Commit 39b750e

Browse files
taoocerosyuyoyuppe
andcommitted
Avoid AppxManifest.xml leak
release Com stream Object immediately Co-Authored-By: Andrey Nekrasov <[email protected]>
1 parent d813a47 commit 39b750e

File tree

1 file changed

+6
-0
lines changed
  • Plugins/Flow.Launcher.Plugin.Program/Programs

1 file changed

+6
-0
lines changed

Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using Flow.Launcher.Plugin.Program.Logger;
1818
using Rect = System.Windows.Rect;
1919
using Flow.Launcher.Plugin.SharedModels;
20+
using Flow.Launcher.Infrastructure.Logger;
2021

2122
namespace Flow.Launcher.Plugin.Program.Programs
2223
{
@@ -81,6 +82,11 @@ private void InitializeAppInfo()
8182

8283
Apps = new List<Application>().ToArray();
8384
}
85+
86+
if (Marshal.ReleaseComObject(stream) > 0)
87+
{
88+
Log.Error("Flow.Launcher.Plugin.Program.Programs.UWP", "AppxManifest.xml was leaked");
89+
}
8490
}
8591

8692

0 commit comments

Comments
 (0)