Remove the temporary buffer to reduce memory usage.