     super
     @_bitmapToElementMatrix = new Matrix
 
+  _releaseCachedBitmap: ->
+    if @_previousCacheSource
+      sourceToBitmapCache.release @_previousCacheSource
+      @_previousCacheSource = null
+
   _unregister: ->
-    sourceToBitmapCache.release @getSource()
+    @_releaseCachedBitmap()
     super
 
   @getter

      validate:   (v) -> !v || isPlainArray v

  _loadBitmapFromSource: (source) ->
    sourceToBitmapCache.get source
    .then (bitmap) =>
      @onNextReady => @queueEvent "load", => bitmap:bitmap


    loaded: (url) -> @_loaded[url]

    @getter
      memoryUsage: ->
        bytes = 0
        for k, v of @_loaded
          bytes += v.byteSize
        bytes

    temporaryPut: (duration, url, bitmap) ->
      @get url, Promise.resolve bitmap
      # log temporaryPut: {bitmap, duration, url}
