Skip to content

Commit

Permalink
Fixed memory leak
Browse files Browse the repository at this point in the history
The memory usage would go to around 800mb on my personal computer before
the fix. Now its less than 100mb.
  • Loading branch information
Lazo committed May 21, 2017
1 parent ee68529 commit e1ae417
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WindowsHacks/MeltScreen.cs
Expand Up @@ -23,6 +23,9 @@ public static void Run()
screenshot = Filter.BlurFast(screenshot);
mask.Picture.Image = screenshot;
mask.Picture.Update();

if (i % 5 == 0) // Perform garbage collection only occassionally as to not reduce performance.
GC.Collect();
}

for (int i = 0; i < 500; i++)
Expand Down

0 comments on commit e1ae417

Please sign in to comment.