diff options
-rw-r--r-- | Xamarin.PropertyEditing.Mac/PropertyList.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Mac/PropertyList.cs b/Xamarin.PropertyEditing.Mac/PropertyList.cs index 21c833f..b52e704 100644 --- a/Xamarin.PropertyEditing.Mac/PropertyList.cs +++ b/Xamarin.PropertyEditing.Mac/PropertyList.cs @@ -167,7 +167,13 @@ namespace Xamarin.PropertyEditing.Mac if (this.propertyTable.Delegate != null) { - this.propertyTable.Delegate = dataDelegate = new PropertyTableDelegate (HostResourceProvider, this.dataSource); + var oldDelegate = this.propertyTable.Delegate; + + this.dataDelegate = new PropertyTableDelegate (HostResourceProvider, this.dataSource); + + this.propertyTable.Delegate = dataDelegate; + + GC.KeepAlive (oldDelegate); } } } |