SwiftyGif: Crash: on deleteImageView(imageView: UIImageView)
the library crashes from time to time (not consistant) on
public func deleteImageView(imageView: UIImageView){
if let index = self.displayViews.indexOf(imageView) {
self.displayViews.removeAtIndex(index)
self.totalGifSize -= imageView.gifImage!.imageSize!
if self.totalGifSize < memoryLimit && !self.haveCache {
self.haveCache = true
for imageView in self.displayViews{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH,0)){
imageView.updateCache()
}
}
}
}
}
on self.displayViews.removeAtIndex(index)
line.
The case: displaying a gif when my app starts, and after login, i remove the screen with the gif form memory, althuogh i dont do any special handling of the SwiftyGif manager Should i remove the gif when im done using it or reset the manager? what am i missing here?
thanks.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20 (4 by maintainers)
Commits related to this issue
- Test fix for #12 — committed to alexiscreuzot/SwiftyGif by alexiscreuzot 8 years ago
- Try fix for #12 — committed to alexiscreuzot/SwiftyGif by alexiscreuzot 8 years ago
- Merge pull request #14 from ravenesque1/bugfix/issue-12-swift-2.3-fix Swift 2.3 Fix for Issue #12 — committed to alexiscreuzot/SwiftyGif by deleted user 8 years ago
I’m having this issue as well… sometimes I pop controllers to a main page that’s populated with GIFs, and the app may crash… sometimes with a nil error or delete error
On Thursday, August 25, 2016, Liron K notifications@github.com wrote: