Skip to content

Commit

Permalink
Bug fixed #221
Browse files Browse the repository at this point in the history
fixed livePhotos memory leak
  • Loading branch information
wade-hawk committed Sep 30, 2019
1 parent 37125e8 commit 82b8448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TLPhotoPicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'TLPhotoPicker'
s.version = '2.0.1'
s.version = '2.0.4'
s.summary = 'multiple phassets picker for iOS lib. like facebook'

# This description is used to generate tags and improve search results.
Expand Down
3 changes: 1 addition & 2 deletions TLPhotoPicker/Classes/TLPhotoCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ open class TLPhotoCollectionViewCell: UICollectionViewCell {
player.pause()
self.player = nil
}
self.livePhotoView?.livePhoto = nil
self.livePhotoView?.isHidden = true
self.livePhotoView?.stopPlayback()
self.livePhotoView?.delegate = nil
Expand Down Expand Up @@ -169,8 +170,6 @@ open class TLPhotoCollectionViewCell: UICollectionViewCell {
override open func prepareForReuse() {
super.prepareForReuse()
stopPlay()
self.livePhotoView?.isHidden = true
self.livePhotoView?.delegate = nil
self.durationView?.isHidden = true
self.durationView?.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.6)
self.selectedHeight?.constant = 10
Expand Down

0 comments on commit 82b8448

Please sign in to comment.