Browse Source

Merge pull request #8757 from ables3000/master

Fix memory leak in show notification when content is object type
pull/8765/head
Max Katz 4 years ago
committed by GitHub
parent
commit
dc9d662a14
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/Avalonia.Controls/Notifications/WindowNotificationManager.cs

11
src/Avalonia.Controls/Notifications/WindowNotificationManager.cs

@ -102,15 +102,12 @@ namespace Avalonia.Controls.Notifications
Content = content
};
if (notification != null)
notificationControl.NotificationClosed += (sender, args) =>
{
notificationControl.NotificationClosed += (sender, args) =>
{
notification.OnClose?.Invoke();
notification?.OnClose?.Invoke();
_items?.Remove(sender);
};
}
_items?.Remove(sender);
};
notificationControl.PointerPressed += (sender, args) =>
{

Loading…
Cancel
Save