App extension - Improvement: Reduce memory consumption.

Force the ShareExtensionManager to release the primary view controller when the action is completed.

We observed that `dealloc` is called for this view controller when the request is cancelled with error (`cancelRequestWithError`), but it is not called when the request is completed (`completeRequestReturningItems`).
This commit is contained in:
Giom Foret
2017-08-25 11:55:37 +02:00
parent 84f3aefac4
commit be2fe8fea9
6 changed files with 79 additions and 22 deletions
@@ -18,6 +18,7 @@
#import <MatrixKit/MatrixKit.h>
@class ShareExtensionManager;
@class SharePresentingViewController;
/**
Posted when the matrix session has been changed.
@@ -64,6 +65,11 @@ extern NSString *const kShareExtensionManagerDidChangeMXSessionNotification;
*/
@property (nonatomic) NSExtensionContext *shareExtensionContext;
/**
The share app extensions primary view controller.
*/
@property (nonatomic) SharePresentingViewController *primaryViewController;
/**
The associated matrix session (nil by default).
*/