Browse Source

Merge branch 'master' into core2d-leak

pull/467/head
Steven Kirk 11 years ago
parent
commit
7b618c6173
  1. 2
      src/Perspex.Controls/Primitives/Popup.cs
  2. 8
      src/Perspex.Controls/Primitives/PopupRoot.cs

2
src/Perspex.Controls/Primitives/Popup.cs

@ -231,6 +231,8 @@ namespace Perspex.Controls.Primitives
protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
{
_topLevel = null;
_popupRoot?.Dispose();
_popupRoot = null;
}
/// <summary>

8
src/Perspex.Controls/Primitives/PopupRoot.cs

@ -15,7 +15,7 @@ namespace Perspex.Controls.Primitives
/// <summary>
/// The root window of a <see cref="Popup"/>.
/// </summary>
public class PopupRoot : TopLevel, IInteractive, IHostedVisualTreeRoot
public class PopupRoot : TopLevel, IInteractive, IHostedVisualTreeRoot, IDisposable
{
private IDisposable _presenterSubscription;
@ -64,6 +64,12 @@ namespace Perspex.Controls.Primitives
/// </summary>
IVisual IHostedVisualTreeRoot.Host => Parent;
/// <inheritdoc/>
public void Dispose()
{
this.PlatformImpl.Dispose();
}
/// <summary>
/// Hides the popup.
/// </summary>

Loading…
Cancel
Save