Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Commit

Permalink
即时Dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed May 26, 2018
1 parent 753edbb commit c71c78a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions TsinghuaNet/MainViewModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ Class MainViewModel
helper.Username = Username
helper.Password = Password
End Sub

Public Sub DisposeHelpers()
net?.Dispose()
auth4?.Dispose()
auth6?.Dispose()
usereg?.Dispose()
End Sub
End Class

Enum NetState
Expand Down
1 change: 1 addition & 0 deletions TsinghuaNet/MainWindow.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Class MainWindow
log.Save()
Notify.Visible = False
Notify.Dispose()
Model.DisposeHelpers()
End Sub
Private Sub MainWindow_StateChanged(sender As Object, e As EventArgs) Handles Me.StateChanged
If Me.WindowState = WindowState.Minimized Then
Expand Down

0 comments on commit c71c78a

Please sign in to comment.