Fix memory leak in NotificationProviderApiTest.Events.