make ugoira disposable

This commit is contained in:
2020-05-15 09:18:02 +08:00
parent da8da3be4d
commit 2fe66d4f8d
3 changed files with 49 additions and 18 deletions

View File

@@ -504,7 +504,7 @@ namespace Pixiview.Illust
public abstract class IllustScrollableCollectionPage<T> : IllustCollectionPage<T>
{
protected const int SCROLL_OFFSET = 33;
protected static readonly object sync = new object();
protected readonly object sync = new object();
private double lastScrollY = double.MinValue;
private double offset;

View File

@@ -153,8 +153,10 @@ namespace Pixiview.Illust
if (ugoira != null)
{
ugoira.TogglePlay(false);
IllustItem.IsPlaying = false;
ugoira.TogglePlay(false);
ugoira.Dispose();
ugoira = null;
}
if (saveFavorites)