From 1511f4b72531820bf3637a0d34419b10be87d424 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Jun 2021 20:08:15 +0800 Subject: [PATCH] Release Unmanaged Object Co-Authored-By: Alekhya <28739210+alekhyareddy28@users.noreply.github.com> --- .../Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs index 4ded3412a66..d17048dcbd8 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs @@ -126,7 +126,12 @@ public string retrieveTargetPath(string path) ((IShellLinkW)link).GetDescription(buffer, MAX_PATH); description = buffer.ToString(); } + + // To release unmanaged memory + Marshal.ReleaseComObject(link); + return target; + } } } \ No newline at end of file