     :returns: The key name under which the image is stored in the cache.
     */
     public func setCachedBackgroundImageData(imageData : NSData, cacheType : CacheType = DefaultCacheType) -> String {
-        return ImageCache.setCachedImageData(imageData, cacheType: cacheType, cachedBlock: { (key) -> Void in
-            self.setBackgroundImageNamed(key)
+        return ImageCache.setCachedImageData(imageData, cacheType: cacheType, cachedBlock: { [weak self] key in
+            self?.setBackgroundImageNamed(key)
         })
     }
     /**

    :returns: The key name under which the image is stored in the cache.
    */
    public func setCachedImageData(imageData : NSData, cacheType : CacheType = DefaultCacheType) -> String {
        return ImageCache.setCachedImageData(imageData, cacheType: cacheType, cachedBlock: { (key) -> Void in
            self.setImageNamed(key)
        })
    }
    /**

    :returns: The key name under which the image is stored in the cache.
    */
    public func setCachedBackgroundImageData(imageData : NSData, cacheType : CacheType = DefaultCacheType) -> String {
        return ImageCache.setCachedImageData(imageData, cacheType: cacheType, cachedBlock: { [weak self] key in
            self?.setBackgroundImageNamed(key)
        })
    }
    /**
