use of com.squareup.leakcanary.RefWatcher in project CoCoin by Nightonke.
the class CustomViewFragment method onDestroy.
@Override
public void onDestroy() {
super.onDestroy();
RefWatcher refWatcher = CoCoinApplication.getRefWatcher(getActivity());
refWatcher.watch(this);
}
use of com.squareup.leakcanary.RefWatcher in project CoCoin by Nightonke.
the class MonthViewFragment method onDestroy.
@Override
public void onDestroy() {
super.onDestroy();
RefWatcher refWatcher = CoCoinApplication.getRefWatcher(getActivity());
refWatcher.watch(this);
}
use of com.squareup.leakcanary.RefWatcher in project MVPArms by JessYanCoding.
the class WEFragment method onDestroy.
@Override
public void onDestroy() {
super.onDestroy();
//使用leakCanary检测fragment的内存泄漏
RefWatcher watcher = WEApplication.getRefWatcher(getActivity());
if (watcher != null) {
watcher.watch(this);
}
this.mWeApplication = null;
}
use of com.squareup.leakcanary.RefWatcher in project chefly_android by chef-ly.
the class RecipeDetailActivity method onDestroy.
@Override
protected void onDestroy() {
super.onDestroy();
DatabaseHandler db = new DatabaseHandler(getApplicationContext());
// Remove an item from shopping list if removed by clicking on ingredient
ArrayList<ShoppingListItem> existing = db.getShoppingList();
ArrayList<ShoppingListItem> toDelete = new ArrayList<>();
for (ShoppingListItem item : existing) {
if (!shoppingList.contains(item)) {
toDelete.add(item);
}
}
db.deleteItemFromShoppingList(toDelete);
// Add new items to shopping list
for (ShoppingListItem item : shoppingList) {
if (item.getId() == -9999) {
db.addItemToShoppingList(item.getName(), item.isPurchased());
}
}
if (BuildConfig.DEBUG) {
RefWatcher refWatcher = CheflyApplication.getRefWatcher(this);
refWatcher.watch(this);
}
}
use of com.squareup.leakcanary.RefWatcher in project chefly_android by chef-ly.
the class ListViewFragment method onDestroy.
@Override
public void onDestroy() {
super.onDestroy();
if (BuildConfig.DEBUG) {
RefWatcher refWatcher = CheflyApplication.getRefWatcher(getContext());
refWatcher.watch(this);
}
}
Aggregations