diff --git a/client/ios/DivKit/Animators/Animator.swift b/client/ios/DivKit/Animators/Animator.swift index cb2d03838..b4256c02b 100644 --- a/client/ios/DivKit/Animators/Animator.swift +++ b/client/ios/DivKit/Animators/Animator.swift @@ -143,6 +143,10 @@ final class ValueAnimator: Animator { isRunning = true } + deinit { + if isRunning { stop() } + } + func stop() { item?.cancel() item = nil diff --git a/client/ios/DivKit/Views/DivViewPreloader.swift b/client/ios/DivKit/Views/DivViewPreloader.swift index e2d86387d..748b9f2e2 100644 --- a/client/ios/DivKit/Views/DivViewPreloader.swift +++ b/client/ios/DivKit/Views/DivViewPreloader.swift @@ -133,8 +133,12 @@ public final class DivViewPreloader { } } - func reset(cardId: DivCardID) { + public func reset(cardId: DivCardID) { blockProviders.removeValue(forKey: cardId) } + + public func resetAll() { + blockProviders.removeAll() + } } #endif diff --git a/client/ios/LayoutKit/LayoutKit/UI/Views/TabbedPages/TabContentsView.swift b/client/ios/LayoutKit/LayoutKit/UI/Views/TabbedPages/TabContentsView.swift index 4523d57d3..7686d0e17 100644 --- a/client/ios/LayoutKit/LayoutKit/UI/Views/TabbedPages/TabContentsView.swift +++ b/client/ios/LayoutKit/LayoutKit/UI/Views/TabbedPages/TabContentsView.swift @@ -7,7 +7,7 @@ final class TabContentsView: BlockView { static let animationDuration: TimeInterval = 0.2 } - var delegate: TabContentsViewDelegate? + weak var delegate: TabContentsViewDelegate? weak var updatesDelegate: TabbedPagesViewModelDelegate? private(set) var selectedPageIndex: CGFloat = 0 private(set) var model: TabContentsViewModel!