當前位置: 首頁>>代碼示例>>Java>>正文


Java RefWatcher.watch方法代碼示例

本文整理匯總了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);
}
 
開發者ID:AndroidKnife,項目名稱:Tiger-Pro,代碼行數:18,代碼來源:BaseFragment.java

示例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();
}
 
開發者ID:Art2Cat,項目名稱:MoonlightNote,代碼行數:21,代碼來源:MoonlightDetailFragment.java

示例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);
}
 
開發者ID:QuickLyric,項目名稱:QuickLyric,代碼行數:19,代碼來源:LyricsViewFragment.java

示例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;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:10,代碼來源:WEFragment.java

示例5: onDestroy

import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
protected void onDestroy() {
    isDestroyed = true;
    super.onDestroy();

    RefWatcher refWatcher = CCApplication.refWatcher;
    refWatcher.watch(this);
}
 
開發者ID:CodingCodersCode,項目名稱:EvolvingNetLib,代碼行數:9,代碼來源:MainActivity.java

示例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);
}
 
開發者ID:VK2012,項目名稱:AppCommonFrame,代碼行數:8,代碼來源:EventBusActivity.java

示例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);
}
 
開發者ID:VK2012,項目名稱:AppCommonFrame,代碼行數:8,代碼來源:EventBusFragment.java

示例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);
}
 
開發者ID:VK2012,項目名稱:AppCommonFrame,代碼行數:9,代碼來源:BaseFragment.java

示例9: onDestroy

import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
public void onDestroy() {
    super.onDestroy();

    RefWatcher refWatcher = MAVApplication.getRefWatcher(getActivity());
    refWatcher.watch(this);
}
 
開發者ID:SalmanTKhan,項目名稱:MyAnimeViewer,代碼行數:8,代碼來源:BaseFragment.java

示例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();
    }
}
 
開發者ID:miguoer,項目名稱:ApplicationCollention,代碼行數:11,代碼來源:BaseActivity.java

示例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);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:9,代碼來源:BaseDialogFragment.java

示例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;
}
 
開發者ID:Wan7451,項目名稱:mvparms,代碼行數:10,代碼來源:WEFragment.java

示例13: onDestroy

import com.squareup.leakcanary.RefWatcher; //導入方法依賴的package包/類
@Override
protected void onDestroy() {
    permission.recycle();
    super.onDestroy();
    RefWatcher refWatcher = AndZillaApplication.getRefWatcher(this);
    refWatcher.watch(this);
}
 
開發者ID:zillachan,項目名稱:AndZilla,代碼行數:8,代碼來源:MainActivity.java

示例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);
        }
    }
}
 
開發者ID:qinci,項目名稱:MarkdownEditors,代碼行數:11,代碼來源:BaseFragment.java

示例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));
}
 
開發者ID:algolia,項目名稱:instantsearch-android-examples,代碼行數:11,代碼來源:EcommerceActivity.java


注:本文中的com.squareup.leakcanary.RefWatcher.watch方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。