Implements IDisposable#setCapacity().