Browse Source

Add INotifyPropertyChanged to QuickClassBrowser.EntityItem.

4.0
Daniel Grunwald 15 years ago
parent
commit
d209e6830f
  1. 10
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.cs
  2. 5
      src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs

10
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.cs

@ -28,7 +28,7 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -28,7 +28,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
/// <summary>
/// ViewModel used for combobox items.
/// </summary>
class EntityItem : IComparable<EntityItem>
class EntityItem : IComparable<EntityItem>, System.ComponentModel.INotifyPropertyChanged
{
IEntity entity;
IImage image;
@ -96,6 +96,14 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -96,6 +96,14 @@ namespace ICSharpCode.AvalonEdit.AddIn
{
return text;
}
// I'm not sure if it actually was a leak or caused by something else, but I saw QCB.EntityItem being alive for longer
// than it should when looking at the heap with WinDbg.
// Maybe this was caused by http://support.microsoft.com/kb/938416/en-us, so I'm adding INotifyPropertyChanged to be sure.
event System.ComponentModel.PropertyChangedEventHandler System.ComponentModel.INotifyPropertyChanged.PropertyChanged {
add { }
remove { }
}
}
public QuickClassBrowser()

5
src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs

@ -80,6 +80,11 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -80,6 +80,11 @@ namespace ICSharpCode.SharpDevelop.Gui
#if DEBUG
if (e.KeyData == (Keys.Control | Keys.Shift | Keys.E)) {
throw new ClownFishException();
} else if (e.KeyData == (Keys.Control | Keys.Shift | Keys.G)) {
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
GC.WaitForPendingFinalizers();
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
versionInfoTextBox.Text = GetVersionInformationString();
}
#endif
}

Loading…
Cancel
Save