From 70cc006a7b6bd3753203fbb9857622aad20fc149 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Tue, 3 Nov 2015 16:11:44 -0800 Subject: [PATCH 1/2] Jason Credits --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a84c45c..5c97a9f 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ Or add it to your project directly by searching for `RadialMenuControl` in Nuget Want to learn how to place this control into your application? It's pretty easy to do - just head over to our [documentation wiki](https://github.com/CatalystCode/radial-menu/wiki) to find out how! +## Special Thanks +A bunch of thanks to [Jason Poon](https://github.com/jpoon), who wrote an early version of this code (and helpes us all a lot). + ## License Copyright (C) 2015 Microsoft, licensed MIT. Please check `LICENSE` for details. From e5148104ec4612128145e472e2eade211a42d305 Mon Sep 17 00:00:00 2001 From: Nikolay Zhekov Date: Thu, 21 Jul 2016 10:11:46 +0100 Subject: [PATCH 2/2] Memory leak fix Unsubscribe PieSlice event handlers to avoid memory leak --- RadialMenuControl/UserControl/Pie.xaml.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RadialMenuControl/UserControl/Pie.xaml.cs b/RadialMenuControl/UserControl/Pie.xaml.cs index 7788209..d39c65c 100644 --- a/RadialMenuControl/UserControl/Pie.xaml.cs +++ b/RadialMenuControl/UserControl/Pie.xaml.cs @@ -158,6 +158,12 @@ public Pie() /// public void Draw() { + foreach (var pieSlice in PieSlices) + { + pieSlice.ChangeMenuRequestEvent -= SourceRadialMenu.ChangeMenu; + pieSlice.ChangeSelectedEvent -= PieSlice_ChangeSelectedEvent; + } + PieSlices.Clear(); var startAngle = StartAngle; @@ -171,7 +177,6 @@ public void Draw() BackgroundEllipse.Fill = new SolidColorBrush(SourceRadialMenu.BackgroundEllipseFill); } - // Draw PieSlices for each Slice Object foreach (var slice in Slices) {