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();
}
}
Aggregations