---
title: didDisconnectNotification
framework: uikit
role: symbol
role_heading: Type Property
path: uikit/uiscene/diddisconnectnotification
---

# didDisconnectNotification

A notification that indicates that UIKit removed a scene from your app.

## Declaration

```swift
nonisolated class let didDisconnectNotification: NSNotification.Name
```

## Mentioned in

Presenting content on a connected display

## Discussion

Discussion Use this notification to perform any final cleanup before your scene is purged from memory. For example, use it to release references to files or shared resources and to save user data. UIKit places the affected scene in the object property of the notification. The removal of a scene is a precursor to the destruction of that scene. UIKit disconnects a scene when the user explicitly closes it in the app switcher. UIKit may also disconnect a scene in order to reclaim memory for other processes. UIKit does not automatically disconnect a scene when the user switches to another app. UIKit also calls the sceneDidDisconnect(_:) method of your scene delegate object.

## See Also

### Responding to life cycle notifications

- [willConnectNotification](uikit/uiscene/willconnectnotification.md)
- [willEnterForegroundNotification](uikit/uiscene/willenterforegroundnotification.md)
- [didActivateNotification](uikit/uiscene/didactivatenotification.md)
- [willDeactivateNotification](uikit/uiscene/willdeactivatenotification.md)
- [didEnterBackgroundNotification](uikit/uiscene/didenterbackgroundnotification.md)
