[hyena/gtk3] ListView: unsubscribe from ValueChanged event in adjustment setters
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena/gtk3] ListView: unsubscribe from ValueChanged event in adjustment setters
- Date: Sat, 24 Aug 2013 10:08:44 +0000 (UTC)
commit 51ddfdaff0c4ac0ffbb2ce8bde41c2c4a03746e0
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Sat Aug 24 12:06:17 2013 +0200
ListView: unsubscribe from ValueChanged event in adjustment setters
Otherwise the previous adjustments presumably could not be garbage
collected.
.../ListView/ListView_Interaction.cs | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
index f41480e..cc7ecb3 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
@@ -82,6 +82,9 @@ namespace Hyena.Data.Gui
if (value == vadjustment) {
return;
}
+ if (vadjustment != null) {
+ vadjustment.ValueChanged -= OnVadjustmentChanged;
+ }
vadjustment = value;
vadjustment.ValueChanged += OnVadjustmentChanged;
UpdateAdjustments ();
@@ -95,6 +98,9 @@ namespace Hyena.Data.Gui
if (value == hadjustment) {
return;
}
+ if (hadjustment != null) {
+ hadjustment.ValueChanged -= OnHadjustmentChanged;
+ }
hadjustment = value;
hadjustment.ValueChanged += OnHadjustmentChanged;
UpdateAdjustments ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]