Code example for Fragment

Methods: onDestroyView

            this.mPhotoView = null;
        // Always call the super method last 
     * This callback is invoked when the Fragment is no longer attached to its Activity. 
     * Sets the URL for the Fragment to null 
    public void onDetach() { 
        // Logs the detach 
        Log.d(LOG_TAG, "onDetach");
        // Removes the reference to the URL 
        mURLString = null;
Connect your IDE to all the code out there  Get Codota for Java