LayerKeyedCollection.Empty (Int32) Method
It removes also entities on the specified layer inside the Environment.Blocks. If a block becomes empty after the removal of the entities on the layer, all the BlockReferences referring to it are removed as well.