本文整理匯總了Java中com.squareup.leakcanary.RefWatcher.watch方法的典型用法代碼示例。如果您正苦於以下問題:Java RefWatcher.watch方法的具體用法?Java RefWatcher.watch怎麽用?Java RefWatcher.watch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.squareup.leakcanary.RefWatcher
的用法示例。
在下文中一共展示了RefWatcher.watch方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
if (unbinder != null) {
unbinder.unbind();
}
Fragment fragment = getTargetFragment();
if (fragment != null && fragment instanceof BaseFragment) {
BaseFragment targetFragment = (BaseFragment) fragment;
targetFragment.onFragmentResult(getTargetRequestCode());
}
if (mainView != null && mainView.getParent() != null) {
((ViewGroup) mainView.getParent()).removeView(mainView);
}
super.onDestroy();
RefWatcher refWatcher = MVPApplication.getRefWatcher(getActivity());
refWatcher.watch(this);
}
示例2: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
if (mInputMethodManager != null) {
mInputMethodManager.hideSoftInputFromWindow(mActivity.getWindow().getDecorView().getWindowToken(), 0);
}
revertUI();
mAudioPlayer.releasePlayer();
// remove FragmentOnTouchListener
if (mFragmentOnTouchListener != null) {
((MoonlightActivity) mActivity).unregisterFragmentOnTouchListener(mFragmentOnTouchListener);
}
RefWatcher refWatcher = MoonlightApplication.getRefWatcher(mActivity);
refWatcher.watch(this);
release();
super.onDestroy();
}
示例3: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
unregisterUpdateBroadcastReceiver();
threadCancelled = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && networkCallback != null)
try {
((ConnectivityManager) getActivity().getApplicationContext()
.getSystemService(Context.CONNECTIVITY_SERVICE)).unregisterNetworkCallback(networkCallback);
} catch (IllegalArgumentException ignored) {
}
if (Build.VERSION.SDK_INT >= 21 && sessionListener != null) {
((MediaSessionManager) getActivity().getSystemService(Context.MEDIA_SESSION_SERVICE))
.removeOnActiveSessionsChangedListener((OnActiveSessionsChangedListener) sessionListener);
}
super.onDestroy();
RefWatcher refWatcher = App.getRefWatcher(getActivity());
refWatcher.watch(this);
}
示例4: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
super.onDestroy();
RefWatcher watcher = WEApplication.getRefWatcher(getActivity());//使用leakCanary檢測fragment的內存泄漏
if (watcher != null) {
watcher.watch(this);
}
this.mWeApplication =null;
}
示例5: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
protected void onDestroy() {
isDestroyed = true;
super.onDestroy();
RefWatcher refWatcher = CCApplication.refWatcher;
refWatcher.watch(this);
}
示例6: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
protected void onDestroy() {
EventBus.getDefault().unregister(this);
super.onDestroy();
RefWatcher refWatcher = BaseApp.getRefWatcher(this);
refWatcher.watch(this);
}
示例7: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
EventBus.getDefault().unregister(this);
super.onDestroy();
RefWatcher refWatcher = BaseApp.getRefWatcher(getActivity());
refWatcher.watch(this);
}
示例8: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
super.onDestroy();
if(mToast != null)
mToast.cancel();
RefWatcher refWatcher = BaseApp.getRefWatcher(getActivity());
refWatcher.watch(this);
}
示例9: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
super.onDestroy();
RefWatcher refWatcher = MAVApplication.getRefWatcher(getActivity());
refWatcher.watch(this);
}
示例10: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
protected void onDestroy() {
super.onDestroy();
//銷毀Activity時,檢測內存泄露
RefWatcher refWatcher = MyApplication.getRefWatcher(this);
refWatcher.watch(this);
if (presenter != null) {
presenter.detachView();
}
}
示例11: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
public void onDestroy() {
super.onDestroy();
RefWatcher refWatcher = MyApplication.getRefWatcher(getActivity());
if (refWatcher != null) {
refWatcher.watch(this);
}
RequestManager.cancelAll(this);
}
示例12: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
super.onDestroy();
RefWatcher watcher = WEApplication.getRefWatcher(getActivity());//使用leakCanary檢測fragment的內存泄漏
if (watcher != null) {
watcher.watch(this);
}
this.mWeApplication = null;
}
示例13: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
protected void onDestroy() {
permission.recycle();
super.onDestroy();
RefWatcher refWatcher = AndZillaApplication.getRefWatcher(this);
refWatcher.watch(this);
}
示例14: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
super.onDestroy();
if (BuildConfig.DEBUG) {//Debug的時候檢查內存泄露
RefWatcher refWatcher = BaseApplication.getRefWatcher(mContext);
if (refWatcher != null) {
refWatcher.watch(this);
}
}
}
示例15: onDestroy
import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
protected void onDestroy() {
filterResultsWindow.dismiss();
searcher.destroy();
toggleArrow(buttonFilter, false);
super.onDestroy();
RefWatcher refWatcher = EcommerceApplication.getRefWatcher(this);
refWatcher.watch(this);
refWatcher.watch(findViewById(R.id.hits));
}