Code example for AsyncTaskLoader

Methods: onReset

0
    /** 
     * Handles a request to completely reset the Loader. 
     */ 
    @Override 
    protected void onReset() { 
        super.onReset(); 
 
        // Ensure the loader is stopped 
        onStopLoading(); 
 
        // At this point we can release resources 
        if (mData != null) {
            onReleaseResources(mData);
            mData = null;
        } 
    } 
 
    /** 
     * Helper function to take care of releasing resources associated with an 
     * actively loaded data set.