code: public void registerDereferencedListener(
              final Provider.DereferenceListener onProviderFreedListener) {
          if (uiThreadRunner.isOnUiThread()) {
              graph.registerDereferencedListener(onProviderFreedListener);
          } else {
              uiThreadRunner.post(new Runnable() {
                  @Override
                  public void run() {
                      graph.registerDereferencedListener(onProviderFreedListener);
                  }
              });
          }
      }
docs: Register {@link Provider.DereferenceListener} which will be called when the provider
  
  @param onProviderFreedListener The listener