# destroyItem

> Callback invoked when a VisualElement created via _makeItem is no longer needed and will be destroyed.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public Action<VisualElement> destroyItem { get; set; }
```

### Remarks

The method called by this callback receives the VisualElement that will be destroyed from the pool.
