Fixed a memory leak in the WPF project

This commit is contained in:
2021-10-04 23:10:43 +13:00
parent 09a2398967
commit 8d81ff91aa
4 changed files with 67 additions and 18 deletions
@@ -147,6 +147,8 @@ namespace Audio_Router
InputAudioComboBox.Items.Add(sourceDevices[i].Name);
}
}
// Set output device & add to inputs too
for (int i = 0; i < targetDevices.Count; i++)
{
if(targetDevices[i].Id == defaultOutput.Id)
@@ -211,7 +213,6 @@ namespace Audio_Router
};
result = await AudioGraph.CreateAsync(settings);
ag = result.Graph;
if (result.Status != AudioGraphCreationStatus.Success)
{
return;