docs: private void resetReportedLeaks() {
          try {
              Field reportedLeaks = ResourceLeakDetector.class.getDeclaredField("reportedLeaks");
              reportedLeaks.setAccessible(true);
              Object f = reportedLeaks.get(this);
              if (f instanceof Map) {
                  ((Map) f).clear();
              }
          }
          catch (Throwable t) {
              // do nothing
          }
      }