Commit 66a4d901 authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Commit Bot

[iOS] Fix potential memory leaks.

Fix a UIWindowScene leak in multiwindow. Improve memory management of
overlays.

Bug: 1090263
Change-Id: Ia5e06566635b182fa33c4976c933cebcf0b5f11d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2228654
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Mark Cogan <marq@chromium.org>
Auto-Submit: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774646}
parent a561166a
...@@ -68,7 +68,7 @@ typedef NS_ENUM(NSUInteger, SceneActivationLevel) { ...@@ -68,7 +68,7 @@ typedef NS_ENUM(NSUInteger, SceneActivationLevel) {
// Window for the associated scene, if any. // Window for the associated scene, if any.
@property(nonatomic, strong) UIWindow* window; @property(nonatomic, strong) UIWindow* window;
@property(nonatomic, strong) UIWindowScene* scene API_AVAILABLE(ios(13)); @property(nonatomic, weak) UIWindowScene* scene API_AVAILABLE(ios(13));
@property(nonatomic, strong) @property(nonatomic, strong)
UISceneConnectionOptions* connectionOptions API_AVAILABLE(ios(13)); UISceneConnectionOptions* connectionOptions API_AVAILABLE(ios(13));
......
...@@ -183,13 +183,13 @@ class OverlayPresentationContextImpl : public OverlayPresentationContext { ...@@ -183,13 +183,13 @@ class OverlayPresentationContextImpl : public OverlayPresentationContext {
// The context's delegate. // The context's delegate.
__weak id<OverlayPresentationContextImplDelegate> delegate_ = nil; __weak id<OverlayPresentationContextImplDelegate> delegate_ = nil;
// The window in which overlay UI will be presented. // The window in which overlay UI will be presented.
UIWindow* window_ = nil; __weak UIWindow* window_ = nil;
// The UIViewController used as the base for overlays UI displayed using child // The UIViewController used as the base for overlays UI displayed using child
// UIViewControllers. // UIViewControllers.
UIViewController* container_view_controller_ = nil; __weak UIViewController* container_view_controller_ = nil;
// The UIViewController used as the base for overlays displayed using // The UIViewController used as the base for overlays displayed using
// presented UIViewControllers. // presented UIViewControllers.
UIViewController* presentation_context_view_controller_ = nil; __weak UIViewController* presentation_context_view_controller_ = nil;
// The presentation capabilities of |coordinator_|'s view controller. // The presentation capabilities of |coordinator_|'s view controller.
UIPresentationCapabilities presentation_capabilities_ = UIPresentationCapabilities presentation_capabilities_ =
UIPresentationCapabilities::kNone; UIPresentationCapabilities::kNone;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment