Skip to content

Commit 025628e

Browse files
authored
Merge branch 'master' into fix-retain-cycle
2 parents fa748b4 + b8acd6a commit 025628e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ All notable changes to this project will be documented in this file.
1616
#### Fixed
1717
- Fixed a retain cycle in completion handler of waveform render operation
1818
- Added by [Philippe Jayet](https://github.com/pjay)
19+
- Cancel waveform render operation when view is released
20+
- Added by [Philippe Jayet](https://github.com/pjay)
1921

2022
---
2123

Source/FDWaveformView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ open class FDWaveformView: UIView {
304304
super.init(frame: rect)
305305
setup()
306306
}
307+
308+
deinit {
309+
inProgressWaveformRenderOperation?.cancel()
310+
}
307311

308312
/// If the cached waveform or in progress waveform is insufficient for the current frame
309313
fileprivate func cacheStatus() -> CacheStatus {

0 commit comments

Comments
 (0)