Releases resources used to display the image.

<p>The containing view must call this method from both {@link View#onStartTemporaryDetach()}
and {@link View#onDetachedFromWindow()}.
199381
public void onDetach() {
    if (!mIsAttached) {
      return;
    }
    mIsAttached = false;
    for (int i = 0; i < mHolders.size(); ++i) {
      mHolders.get(i).onDetach();
    }
  }
576524
@Override
    public void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters)
    {
        this.previousEvent = Event.IMAGE;

        super.onImage(reference, freestanding, parameters);
    }
20654
public synchronized void release()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "release");

      released = true;
      valid = false;

      if (receivedBuffer != null)
      {
         receivedBuffer.release();
         receivedBuffer = null;
      }
      if (receivedData != null)
      {
         receivedData.release();
         receivedData = null;
      }

      if (dataList != null)
      {
         for (int x = 0; x < dataList.size(); x++)
         {
            dataList.get(x).release();
         }

         dataList.clear();
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "release");
   }
1062191
public void destroy() {
        if (mContentView != null) {
            if (mGroupBasicAdapter != null) {
                mGroupBasicAdapter.destroy();
            }
            mContentView.setAdapter(null);
            mContentView = null;
        }
        TimerSupport timerSupport = getService(TimerSupport.class);
        if (timerSupport != null) {
            timerSupport.clear();
        }
        SimpleClickSupport simpleClickSupport = getService(SimpleClickSupport.class);
        if (simpleClickSupport != null) {
            simpleClickSupport.destroy();
        }
        ExposureSupport exposureSupport = getService(ExposureSupport.class);
        if (exposureSupport != null) {
            exposureSupport.destroy();
        }
        BusSupport busSupport = getService(BusSupport.class);
        if (busSupport != null) {
            busSupport.shutdown();
        }
        BannerSupport bannerSupport = getService(BannerSupport.class);
        if (bannerSupport != null) {
            bannerSupport.destroy();
        }
        VafContext vafContext = getService(VafContext.class);
        if (vafContext != null) {
            vafContext.onDestroy();
        }
    }
406151
@Override
    protected void releaseResources() {
        super.releaseResources();
        PropertySpec.current.remove();
        PropertySpec.currentSpec.remove();
        if (this.state != State.DESTROYED) {
            ParamValueLoaderService.clearParamTree();
            sessionManager = null;
            this.allParams = null;
            this.extraParams = null;
            this.requestParamCache = null;
            this.router = null;
            this.handler = null;
            // xio impl might need this this.request = null;
            // xio impl might need this this.response = null;
            this.flash = null;
            this.session = null;
            this.controllerInstances = null;
            this.result = null;
            this.uploads.clear();
            ActionContext.clearLocal();
        }
        this.state = State.DESTROYED;
    }
813503
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
    public static void detach(Activity activity, ViewTreeObserver.OnGlobalLayoutListener l) {
        ViewGroup contentView = activity.findViewById(android.R.id.content);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            contentView.getViewTreeObserver().removeOnGlobalLayoutListener(l);
        } else {
            //noinspection deprecation
            contentView.getViewTreeObserver().removeGlobalOnLayoutListener(l);
        }
    }
555664
public void destroySelf(){
        if(mPager == null || mPager.getAdapter() == null){
            return;
        }
        InfinitePagerAdapter wrapper = (InfinitePagerAdapter)mPager.getAdapter();
        PagerAdapter adapter = wrapper.getRealAdapter();
        if(adapter!=null){
            adapter.unregisterDataSetObserver(dataChangeObserver);
        }
        removeAllViews();
    }
553552
public void exit() {
        if (currentView == null) {
            GdxUtilities.exit();
        } else {
            currentView.getStage().addAction(Actions.sequence(getViewHidingAction(currentView),
                    Actions.run(GdxUtilities.getApplicationClosingRunnable())));
        }
    }
1182922
@Override
    protected void releaseResourceImpl(MailResourcesHolder resource)
    {
        //get transport
        Transport transport=resource.getTransport();

        if(transport!=null)
        {
            if(transport.isConnected())
            {
                try
                {
                    //close connection
                    transport.close();
                }       
                catch(Throwable throwable)
                {
                    //ignore
                }
            }
        }
    }
496871
public synchronized void dispose() {
    CloseableReference.closeSafely(mPreviewBitmap);
    mPreviewBitmap = null;
    CloseableReference.closeSafely(mDecodedFrames);
    mDecodedFrames = null;
  }
380999
@SuppressWarnings("unused")
    public void resetView() {
        if (mForwardAnimatorSet != null && mForwardAnimatorSet.isRunning()) {
            mForwardAnimatorSet.end();
        }
        if (mReverseAnimatorSet != null && mReverseAnimatorSet.isRunning()) {
            mReverseAnimatorSet.end();
        }
        if (mAnimationView != null && mAnimationView.isPlaying()) {
            mAnimationView.stopAnimation();
        }
        if (mBaseContainer != null) {
            mBaseContainer.setVisibility(VISIBLE);
        }
        if (mAnimationView != null) {
            mAnimationView.setAnimated(false);
        }
        if (mContextView != null) {
            mContextView.setVisibility(GONE);
        }
    }
18386
private void releaseEglResources() {
        mReadyForFrames = false;
        if (mInputWindowSurface != null) {
            mInputWindowSurface.release();
            mInputWindowSurface = null;
        }
        if (mFullScreen != null) {
            mFullScreen.release();
            mFullScreen = null;
        }
        if (mEglCore != null) {
            mEglCore.release();
            mEglCore = null;
        }

        mSurfaceTexture = null;
    }
1208428
@Override
	public void release() {
		super.release();
		setBase64Expr(null);
		setActionExpr(null);
		setModuleExpr(null);
		setAlignExpr(null);
		setAltExpr(null);
		setAltKeyExpr(null);
		setBorderExpr(null);
		setBundleExpr(null);
		setDirExpr(null);
		setHeightExpr(null);
		setHspaceExpr(null);
		setImageNameExpr(null);
		setIsmapExpr(null);
		setLangExpr(null);
		setLocaleExpr(null);
		setNameExpr(null);
		setOnclickExpr(null);
		setOndblclickExpr(null);
		setOnkeydownExpr(null);
		setOnkeypressExpr(null);
		setOnkeyupExpr(null);
		setOnmousedownExpr(null);
		setOnmousemoveExpr(null);
		setOnmouseoutExpr(null);
		setOnmouseoverExpr(null);
		setOnmouseupExpr(null);
		setPageExpr(null);
		setPageKeyExpr(null);
		setParamIdExpr(null);
		setParamNameExpr(null);
		setParamPropertyExpr(null);
		setParamScopeExpr(null);
		setPropertyExpr(null);
		setScopeExpr(null);
		setSrcExpr(null);
		setSrcKeyExpr(null);
		setStyleExpr(null);
		setStyleClassExpr(null);
		setStyleIdExpr(null);
		setTitleExpr(null);
		setTitleKeyExpr(null);
		setUseLocalEncodingExpr(null);
		setUsemapExpr(null);
		setVspaceExpr(null);
		setWidthExpr(null);
	}
225055
public void detachView(View view) {
		mViews.remove(view);
		mInRestoreState.remove(view);

		Set<ViewCommand<View>> currentState = Collections.newSetFromMap(new WeakHashMap<ViewCommand<View>, Boolean>());
		currentState.addAll(mViewCommands.getCurrentState());
		mViewStates.put(view, currentState);
	}
760012
@Override public void close () {
    if (!disposed) {
      disposed = true;
      if (gfx.exec().isMainThread()) {
        gfx.gl.glDeleteTexture(id);
      } else {
        gfx.exec().invokeNextFrame(new Runnable() {
          public void run () { gfx.gl.glDeleteTexture(id); }
        });
      }
    }
  }
1266785
@Override
    public void onDestroyView() {
        mHandler.removeCallbacks(mRequestFocus);
        mList = null;
        mListShown = false;
        mEmptyView = mProgressContainer = mListContainer = null;
        mStandardEmptyView = null;
        super.onDestroyView();
    }
1268251
private void releaseDisplayView() {
        if (mDisplayView instanceof GLCameraEncoderView) {
            ((GLCameraEncoderView) mDisplayView).releaseCamera();
        } else if (mDisplayView instanceof GLCameraView)
            ((GLCameraView) mDisplayView).releaseCamera();
    }