Skip to content

Commit

Permalink
Fix memory leaks
Browse files Browse the repository at this point in the history
ProJend committed Oct 7, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 8228ce7 commit 0ea1b7a
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TrueLove.UWP/Views/CommentsPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;

// https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板

@@ -23,6 +24,11 @@ public CommentsPage()

}

protected override void OnNavigatedFrom(NavigationEventArgs e)
{
Window.Current.Activated -= OnWindowActivated;
}

async void GetSourceCode()
{
RefreshButton.IsEnabled = false;
6 changes: 6 additions & 0 deletions TrueLove.UWP/Views/ImagesPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Imaging;
using Windows.UI.Xaml.Navigation;

// https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板

@@ -23,6 +24,11 @@ public ImagesPage()
DataLoad();
}

protected override void OnNavigatedFrom(NavigationEventArgs e)
{
Window.Current.Activated -= OnWindowActivated;
}

/// <summary>
/// 返回顶部按钮。
/// </summary>

0 comments on commit 0ea1b7a

Please sign in to comment.