Browse Source

Implement IDisposable for textview.

pull/219/head
Eusebiu Marcu 15 years ago
parent
commit
ba4717d516
  1. 7
      ILSpy/TextView/DecompilerTextView.cs

7
ILSpy/TextView/DecompilerTextView.cs

@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy.TextView
/// Contains all the threading logic that makes the decompiler work in the background.
/// </summary>
[Export, PartCreationPolicy(CreationPolicy.Shared)]
public sealed partial class DecompilerTextView : UserControl
public sealed partial class DecompilerTextView : UserControl, IDisposable
{
readonly ReferenceElementGenerator referenceElementGenerator;
readonly UIElementGenerator uiElementGenerator;
@ -672,6 +672,11 @@ namespace ICSharpCode.ILSpy.TextView @@ -672,6 +672,11 @@ namespace ICSharpCode.ILSpy.TextView
state.DecompiledNodes = decompiledNodes;
return state;
}
public void Dispose()
{
DisplaySettingsPanel.CurrentDisplaySettings.PropertyChanged -= CurrentDisplaySettings_PropertyChanged;
}
}
public class DecompilerTextViewState

Loading…
Cancel
Save