-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMain.IDisposable.cs
More file actions
42 lines (33 loc) · 921 Bytes
/
Main.IDisposable.cs
File metadata and controls
42 lines (33 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Community.PowerToys.Run.Plugin._1Password;
public partial class Main : IDisposable
{
private bool _disposed;
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (!_disposed && disposing)
{
if (_context != null && _context.API != null)
{
_context.API.ThemeChanged -= OnThemeChanged;
}
if (_items != null)
{
_items.Clear();
}
_disposed = true;
}
}
}