code: public void cleanup() {
      keys.cleanup();
      counts.cleanup();
      dictionary.cleanup();
      // Decrement the dictionary memory by the total size of all the elements
      memoryEstimate.decrementDictionaryMemory(SizeOf.SIZE_OF_LONG * numElements);
    }
docs: A cleanup method that should be called before allowing the object to leave scope