/**
   * Instead of a deconstructor: De-initialize ThumbnailManager and its thumbnailers.
   *
   * <p>This functions should be called before termination of the program, and Thumbnails can't be
   * generated after calling this function.
   */
  public void close() {
    if (allThumbnailers == null) return; // Already closed

    for (Thumbnailer thumbnailer : allThumbnailers) {
      try {
        thumbnailer.close();
      } catch (IOException e) {
        mLog.error("Error during close of Thumbnailer:", e);
      }
    }

    thumbnailers = null;
    allThumbnailers = null;
  }