Browse Source

Fix show notification memory leak when content is object

pull/8757/head
ables3000 4 years ago
committed by GitHub
parent
commit
b7257ed37f
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