<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.10.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSReleaseAlertPanel(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@F@NSReleaseAlertPanel"
  },
  "title" : "NSReleaseAlertPanel(_:)"
}
-->

# NSReleaseAlertPanel(_:)

Disposes of an alert panel.

```
func NSReleaseAlertPanel(_ panel: Any!)
```

## Discussion

When you’re finished with a panel created by a function such as [`NSGetAlertPanel`](/documentation/AppKit/NSGetAlertPanel), [`NSGetCriticalAlertPanel`](/documentation/AppKit/NSGetCriticalAlertPanel), or [`NSGetInformationalAlertPanel`](/documentation/AppKit/NSGetInformationalAlertPanel), you must dispose of it by passing it to this function.

Note that the alert panel may not be deallocated immediately because it may have internal references that are disposed of in a deferred way. You should not make the assumption that the alert panel is immediately removed from the application window list.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)