Patent ID: 8516018

Claim:
A method, comprising: defining an image source of a computing device, wherein: the image source comprises one or more functions and at least a weak reference to one or more image views for an image object, the one or more functions comprising an unbind function, the image object comprises a reference to first storage of the computing device storing an image, the image source, the at least the weak reference to the one or more image views, and the image object are stored in a managed portion of memory of the computing device, the first storage is in an unmanaged portion of memory of the computing device, the managed portion differs from the unmanaged portion, wherein the managed portion of memory is managed by a garbage collector, and wherein the garbage collector is not configured to deallocate the first storage from the unmanaged portion of memory; displaying the image using the computing device; determining, using the computing device, whether to continue displaying the image; and upon determining to discontinue displaying the image: calling the unbind function of the image source for a given image view of the one or more image views, wherein the computing device: discontinues the display of the image, places the given image view into an image cache, starts a cache timer after placing the given image view into the image cache, determines whether the image is to be bound prior to expiration of the cache timer after a pre-determined period of time, in response to determining that the image is to be bound prior to the expiration of the cache timer, displays the image, and in response to determining that the image is not to be bound prior to the expiration of the cache timer, the image source deallocates the first storage by at least: after the unbind function is called, receiving an indication at the image source from the garbage collector that the given image view is solely weakly referenced, in response to receiving the indication that the given image view is solely weakly referenced, the image source initiating deallocation of the first storage, and after initiating deallocation of the first storage, the image source releasing a weak reference to the given image view.