mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
Fix memory leaks in core components
commit_hash:1f841204f9d5484c75e3f92c9a1faa0e127a58de
This commit is contained in:
@@ -143,6 +143,10 @@ final class ValueAnimator<I: ValueInterpolator>: Animator {
|
||||
isRunning = true
|
||||
}
|
||||
|
||||
deinit {
|
||||
if isRunning { stop() }
|
||||
}
|
||||
|
||||
func stop() {
|
||||
item?.cancel()
|
||||
item = nil
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user