Skip to content

Commit 2e412a0

Browse files
authored
Merge pull request #488 from taooceros/ReleaseComObject
Release Unmanaged Object
2 parents 477d988 + 1511f4b commit 2e412a0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ public string retrieveTargetPath(string path)
126126
((IShellLinkW)link).GetDescription(buffer, MAX_PATH);
127127
description = buffer.ToString();
128128
}
129+
130+
// To release unmanaged memory
131+
Marshal.ReleaseComObject(link);
132+
129133
return target;
134+
130135
}
131136
}
132137
}

0 commit comments

Comments
 (0)