# Sandbox.Component.OnParentDestroy

```csharp
void OnParentDestroy()
```

The parent object is being destroyed. This is a nice place to switch to a healthier parent.

Declared in [Sandbox.Component](/api/Sandbox.Component).
Assembly: `Sandbox.Engine`.
