Fix memory leaks in compressor

This commit is contained in:
Sophie Marie Axebane 2023-03-10 21:35:27 -06:00
parent 34ca1b7f48
commit 0ee099cb7a
No known key found for this signature in database
GPG Key ID: F5D997A1BEF778ED
2 changed files with 1 additions and 1 deletions

View File

@ -846,7 +846,6 @@ namespace Novetus.Core
int n;
while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
{
throw new Exception();
compressor.Write(buffer, 0, n);
}
}

View File

@ -53,6 +53,7 @@ public partial class PlaceCompressor : Form
finally
{
selectButton.Enabled = true;
System.GC.Collect(); // I know this isn't recommended, but repeated use in a single session can cause memory leaks otherwise.
if (!successful) { processStatus.Text = "Error"; }
else
{