public static synchronized void destory() { decreaseUserCount(); if (sUserCount <= 0 && sSelf != null) { sSelf.clearUp(); sSelf = null; sIsPrepare = false; sUserCount = 0; if (sThemeAppinBilling != null) { sThemeAppinBilling.destory(); sThemeAppinBilling = null; } // 销毁HttpAdapter SimpleHttpAdapter.destory(); // 销毁HttpTool GoStoreHttpTool.destory(); // 释放ImageManager里面的资源 ImageManager.destory(); // 销毁线程池 ThreadPoolManager.destory(); // 销毁缓存管理器 CacheManager.destory(); GoStoreCacheManager.destory(); // 退出商店督促gc回收 System.gc(); // 把进程杀掉 android.os.Process.killProcess(android.os.Process.myPid()); } }
public static synchronized void destroyNotKill() { decreaseUserCount(); if (sUserCount <= 0 && sSelf != null) { sSelf.clearUp(); sSelf = null; sIsPrepare = false; sUserCount = 0; // 销毁HttpAdapter SimpleHttpAdapter.destory(); // 释放ImageManager里面的资源 ImageManager.destory(); // 销毁线程池 ThreadPoolManager.destory(); // 销毁缓存管理器 CacheManager.destory(); GoStoreCacheManager.destory(); // 退出商店督促gc回收 System.gc(); // 这里不杀掉进程 } }