Code example for WeakReference

Methods: clear

        if (localDrawable != null)
        // If this View still exists, clears the weak reference, then sets the reference to null 
        if (mThisView != null) {
            mThisView = null;
        // Sets the downloader thread to null 
        this.mDownloadThread = null;
        // Always call the super method last 
     * This callback is invoked when the system tells the View to draw itself. If the View isn't 
     * already drawn, and its URL isn't null, it invokes a Thread to download the image. Otherwise, 
     * it simply passes the existing Canvas to the super method