Fixed a bug where the set was not released when calling removeAllObjects.