Search in sources :

Example 1 with TimerSupport

use of com.tmall.wireless.tangram.support.TimerSupport in project Tangram-Android by alibaba.

the class BaseTangramEngine method destroy.

/**
 * Call this when your activity is ready to destory to clear inner resource.
 */
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();
    }
    BusSupport busSupport = getService(BusSupport.class);
    if (busSupport != null) {
        busSupport.shutdown();
    }
    VafContext vafContext = getService(VafContext.class);
    if (vafContext != null) {
        vafContext.onDestroy();
    }
}
Also used : VafContext(com.tmall.wireless.vaf.framework.VafContext) TimerSupport(com.tmall.wireless.tangram.support.TimerSupport) BusSupport(com.tmall.wireless.tangram.eventbus.BusSupport)

Aggregations

BusSupport (com.tmall.wireless.tangram.eventbus.BusSupport)1 TimerSupport (com.tmall.wireless.tangram.support.TimerSupport)1 VafContext (com.tmall.wireless.vaf.framework.VafContext)1