# DestroyBatch(ReadOnlySpan<PhysicsShape>, bool)

> Destroy a batch of shapes, destroying all PhysicsShape.Contact the shapes are involved in. Any invalid shapes will be ignored including chain segment shapes created via a PhysicsChain (the chain must be destroyed)." Owned shapes will produce a warning and will not be destroyed (See PhysicsShape.SetOwner ). See PhysicsBody.MassConfiguration.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public static void DestroyBatch(ReadOnlySpan<PhysicsShape> shapes, bool updateBodyMass)
```

### Parameters

**** (\[ReadOnlySpan\<PhysicsShape>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The shapes to destroy.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to update the body mass configuration. Not doing so is faster, especially when destroying multiple shapes.
