From f72c658eeefb043be24514df1583a0cc11d1d239 Mon Sep 17 00:00:00 2001 From: William Van Haevre Date: Wed, 18 Dec 2024 19:01:49 +0100 Subject: [PATCH 1/2] Don't keep strong reference to targetViews --- .../THEOplayerRCTPresentationModeManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/presentationMode/THEOplayerRCTPresentationModeManager.swift b/ios/presentationMode/THEOplayerRCTPresentationModeManager.swift index 4b9471ac5..ea553ddb0 100644 --- a/ios/presentationMode/THEOplayerRCTPresentationModeManager.swift +++ b/ios/presentationMode/THEOplayerRCTPresentationModeManager.swift @@ -12,8 +12,8 @@ public class THEOplayerRCTPresentationModeManager { private var presentationMode: THEOplayerSDK.PresentationMode = .inline private var rnInlineMode: THEOplayerSDK.PresentationMode = .inline // while native player is inline, RN player can be inline or fullsceen - private var containerView: UIView? // view containing the playerView and it's siblings (e.g. UI) - private var inlineParentView: UIView? // target view for inline representation + private weak var containerView: UIView? // view containing the playerView and it's siblings (e.g. UI) + private weak var inlineParentView: UIView? // target view for inline representation // MARK: Events var onNativePresentationModeChange: RCTDirectEventBlock? From 8c87a77d3ca5b2ade4d58ac4a6117cc66a8ceae7 Mon Sep 17 00:00:00 2001 From: William Van Haevre Date: Wed, 18 Dec 2024 19:06:17 +0100 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95ff3a5fc..c002d3d5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fixed a memory leak on iOS, where the presentationModeManager was holding a strong reference to the fullscreen's target and return views + ## [8.11.1] - 24-12-18 ### Fixed