Package 

Object LeakAssertions

    • Method Summary

      Modifier and Type Method Description
      final Unit assertNoLeaks(String tag) Asserts that there are no leak in the heap at this point in time.
      final String getNO_TAG()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • assertNoLeaks

         final Unit assertNoLeaks(String tag)

        Asserts that there are no leak in the heap at this point in time.

        This method should be called on the instrumentation thread.

        This method is may block the current thread for a significant amount of time, as it might need to dump the heap and analyze it.

        If leaks are found, this method is expected to throw an exception, which will fail the test.

        The specific details depend on what you configured in DetectLeaksAssert.update.

        tag identifies the calling code, which can then be used for reporting purposes or to skip leak detection for specific tags in a subset of tests (see SkipLeakDetection).