public void run() { final Set<Tidy> candidates = Collections.newSetFromMap(new IdentityHashMap<>()); for (GlobalState state : globallyExtant) candidates.add(state.tidy); removeExpected(candidates); this.candidates.retainAll(candidates); if (!this.candidates.isEmpty()) { List<String> names = new ArrayList<>(); for (Tidy tidy : this.candidates) names.add(tidy.name()); logger.warn("Strong reference leak candidates detected: {}", names); } this.candidates = candidates; }
void release(Ref.State ref) { locallyExtant.remove(ref); if (-1 == counts.decrementAndGet()) { globallyExtant.remove(this); try { tidy.tidy(); } catch (Throwable t) { logger.error("Error when closing {}", this, t); Throwables.propagate(t); } } }
void traverse(final RefCounted.Tidy rootObject) path.offer(newInProgressVisit(rootObject, getFields(rootObject.getClass()), null, rootObject.name()));
void traverse(final RefCounted.Tidy rootObject) path.offer(newInProgressVisit(rootObject, getFields(rootObject.getClass()), null, rootObject.name()));
void traverse(final RefCounted.Tidy rootObject) path.offer(newInProgressVisit(rootObject, getFields(rootObject.getClass()), null, rootObject.name()));
void traverse(final RefCounted.Tidy rootObject) path.offer(newInProgressVisit(rootObject, getFields(rootObject.getClass()), null, rootObject.name()));
Throwable release(Ref.State ref, Throwable accumulate) { locallyExtant.remove(ref); if (-1 == counts.decrementAndGet()) { globallyExtant.remove(this); try { if (tidy != null) tidy.tidy(); } catch (Throwable t) { accumulate = merge(accumulate, t); } } return accumulate; }
Throwable release(Ref.State ref, Throwable accumulate) { locallyExtant.remove(ref); if (-1 == counts.decrementAndGet()) { globallyExtant.remove(this); try { if (tidy != null) tidy.tidy(); } catch (Throwable t) { accumulate = merge(accumulate, t); } } return accumulate; }
Throwable release(Ref.State ref, Throwable accumulate) { locallyExtant.remove(ref); if (-1 == counts.decrementAndGet()) { globallyExtant.remove(this); try { if (tidy != null) tidy.tidy(); } catch (Throwable t) { accumulate = merge(accumulate, t); } } return accumulate; }
Throwable release(Ref.State ref, Throwable accumulate) { locallyExtant.remove(ref); if (-1 == counts.decrementAndGet()) { globallyExtant.remove(this); try { if (tidy != null) tidy.tidy(); } catch (Throwable t) { accumulate = merge(accumulate, t); } } return accumulate; }
public void run() { final Set<Tidy> candidates = Collections.newSetFromMap(new IdentityHashMap<>()); for (GlobalState state : globallyExtant) candidates.add(state.tidy); removeExpected(candidates); this.candidates.retainAll(candidates); if (!this.candidates.isEmpty()) { List<String> names = new ArrayList<>(); for (Tidy tidy : this.candidates) names.add(tidy.name()); logger.warn("Strong reference leak candidates detected: {}", names); } this.candidates = candidates; }
public void run() { final Set<Tidy> candidates = Collections.newSetFromMap(new IdentityHashMap<>()); for (GlobalState state : globallyExtant) candidates.add(state.tidy); removeExpected(candidates); this.candidates.retainAll(candidates); if (!this.candidates.isEmpty()) { List<String> names = new ArrayList<>(); for (Tidy tidy : this.candidates) names.add(tidy.name()); logger.warn("Strong reference leak candidates detected: {}", names); } this.candidates = candidates; }
public void run() { final Set<Tidy> candidates = Collections.newSetFromMap(new IdentityHashMap<>()); for (GlobalState state : globallyExtant) candidates.add(state.tidy); this.candidates.retainAll(candidates); if (!this.candidates.isEmpty()) { List<String> names = new ArrayList<>(); for (Tidy tidy : this.candidates) names.add(tidy.name()); logger.warn("Strong reference leak candidates detected: {}", names); } this.candidates = candidates; }
public String toString() { if (tidy != null) return tidy.getClass() + "@" + System.identityHashCode(tidy) + ":" + tidy.name(); return "@" + System.identityHashCode(this); } }
public String toString() { return tidy.getClass() + "@" + System.identityHashCode(tidy) + ":" + tidy.name(); } }
public String toString() { if (tidy != null) return tidy.getClass() + "@" + System.identityHashCode(tidy) + ":" + tidy.name(); return "@" + System.identityHashCode(this); } }
public String toString() { if (tidy != null) return tidy.getClass() + "@" + System.identityHashCode(tidy) + ":" + tidy.name(); return "@" + System.identityHashCode(this); } }
public String toString() { if (tidy != null) return tidy.getClass() + "@" + System.identityHashCode(tidy) + ":" + tidy.name(); return "@" + System.identityHashCode(this); } }