shadows/framework/src/main/java/org/robolectric/shadows/ShadowAccessibilityNodeInfo.java
public static boolean areThereUnrecycledNodes(boolean printUnrecycledNodesToSystemErr) {
    if (printUnrecycledNodesToSystemErr) {
      for (final StrictEqualityNodeWrapper wrapper : obtainedInstances.keySet()) {
        final ShadowAccessibilityNodeInfo shadow = Shadow.extract(wrapper.mInfo);

        System.err.println(String.format(
            "Leaked contentDescription = %s. Stack trace:", shadow.getContentDescription()));
        for (final StackTraceElement stackTraceElement : obtainedInstances.get(wrapper)) {
          System.err.println(stackTraceElement.toString());
        }
      }
    }

    return (obtainedInstances.size() != 0);
  }
public static boolean areThereUnrecycledNodes(boolean printUnrecycledNodesToSystemErr) {
    if (printUnrecycledNodesToSystemErr) {
      for (final StrictEqualityNodeWrapper wrapper : obtainedInstances.keySet()) {
        final ShadowAccessibilityNodeInfo shadow = Shadow.extract(wrapper.mInfo);

        System.err.println(String.format(
            "Leaked contentDescription = %s. Stack trace:", shadow.getContentDescription()));
        for (final StackTraceElement stackTraceElement : obtainedInstances.get(wrapper)) {
          System.err.println(stackTraceElement.toString());
        }
      }
    }

    return (obtainedInstances.size() != 0);
  }
public static boolean areThereUnrecycledNodes ( boolean printUnrecycledNodesToSystemErr ) { if ( printUnrecycledNodesToSystemErr ) { for ( final StrictEqualityNodeWrapper wrapper : obtainedInstances . keySet ( ) ) { final ShadowAccessibilityNodeInfo shadow = Shadow . extract ( wrapper . mInfo ) ; System . err . println ( String . format ( "Leaked contentDescription = %s. Stack trace:" , shadow . getContentDescription ( ) ) ) ; for ( final StackTraceElement stackTraceElement : obtainedInstances . get ( wrapper ) ) { System . err . println ( stackTraceElement . toString ( ) ) ; } } } return ( obtainedInstances . size ( ) != 0 ) ; }
Check for leaked objects that were {@code obtain}ed but never
{@code recycle}d.

@param printUnrecycledNodesToSystemErr - if true, stack traces of calls
to {@code obtain} that lack matching calls to {@code recycle} are
dumped to System.err.
@return {@code true} if there are unrecycled nodes
Check for leaked objects that were { @code obtain } ed but never { @code recycle } d .