@Override
  public void onCancellation(@Nonnull DataSource<T> dataSource) {}
Base implementation of {@link DataSubscriber} that ensures that the data source is closed when
the subscriber has finished with it.

<p>Sample usage:

<pre>
<code>
dataSource.subscribe(
  new BaseDataSubscriber() {
    {@literal @}Override
    public void onNewResultImpl(DataSource dataSource) {
      // Store image ref to be released later.
      mCloseableImageRef = dataSource.getResult();
      // Use the image.
      updateImage(mCloseableImageRef);
      // No need to do any cleanup of the data source.
    }

    {@literal @}Override
    public void onFailureImpl(DataSource dataSource) {
      // No cleanup of the data source required here.
    }
  });
</code>
</pre>
fbcore/src/main/java/com/facebook/datasource/BaseDataSubscriber.java