Class GarbageCollectors


  • public final class GarbageCollectors
    extends Object
    Utilities for working with the garbage collector in tests.
    • Method Detail

      • blockOnGC

        public static void blockOnGC()
        Runs the garbage collector and waits until all of the provided WeakReference are cleared, indicating the referenced objects have been collected.