Skip to content

Commit 5beb012

Browse files
committed
Keeping manager reference
1 parent f8e9387 commit 5beb012

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/AppNotificationTests/AppNotifications.Test.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ namespace AppNotifications::Test
241241

242242
bool EnsureNoActiveToasts()
243243
{
244-
auto removeAllAsync{ winrt::AppNotificationManager::Default().RemoveAllAsync() };
244+
auto manager = winrt::AppNotificationManager::Default();
245+
auto removeAllAsync{ manager.RemoveAllAsync() };
245246
if (removeAllAsync.wait_for(c_timeout) != winrt::Windows::Foundation::AsyncStatus::Completed)
246247
{
247248
removeAllAsync.Cancel();

0 commit comments

Comments
 (0)