                 }
                 
                 self.imageViews = imageViews
+                self.imageDownloadOperations = downloadOperations
             }
         }
+    }
+
+    func clearImages() {
+        if let imageViews = self.imageViews {
+            for imageView in imageViews {
+                imageView.sd_cancelCurrentAnimationImagesLoad()
+                imageView.sd_cancelCurrentImageLoad()
+                imageView.image = nil
+                imageView.animatedImage = nil
+                imageView.removeFromSuperview()
+            }
+        }
+        
+        if let operations = self.imageDownloadOperations {
+            for operation in operations {
+                operation.cancel()
+            }
+        }
+        
+        self.imageViews = nil
+        self.imageDownloadOperations = nil
     }
 
     func imageAtPoint(point: CGPoint) -> UIImage? {


    var imageViews: Array<FLAnimatedImageView>?
    var shareHandler: ((UIImage) -> ())?
    
    var contentWidth: CGFloat? {
        didSet {


    override func prepareForReuse() {
        super.prepareForReuse()
        self.clearImages()
    }

    func updateImages() {
        if let images = self.images {
            if let contentWidth = self.contentWidth {
                self.clearImages()

                let imageManager = SDWebImageManager.sharedManager()
                let imageDownloader = SDWebImageDownloader.sharedDownloader()
                let widthRatio: Float = 1.0 / Float(images.count)
                var imageViews = Array<FLAnimatedImageView>()
                var downloadOperations = Array<SDWebImageOperation>()
                var lastImageView: UIImageView?
                for image in images {
                    let imageView = FLAnimatedImageView()
