diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index e3b10cfa3c..ee03218135 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -180,8 +180,6 @@ The current call view controller (if any). /** Cache for payloads received with incoming push notifications. The key is the event id. The value, the payload. - Note: for the moment, objects in this dictionary are never removed but - the impact on memory is low. */ NSMutableDictionary *incomingPushPayloads; @@ -548,6 +546,7 @@ - (void)applicationWillEnterForeground:(UIApplication *)application { [array removeAllObjects]; } + [incomingPushPayloads removeAllObjects]; // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. @@ -1495,7 +1494,7 @@ - (void)handleLimitedLocalNotifications:(MXSession*)mxSession events:(NSArray