---
title: "unregisterAsset(identifier:completion:)"
framework: phase
role: symbol
role_heading: Instance Method
path: "phase/phaseassetregistry/unregisterasset(identifier:completion:)"
---

# unregisterAsset(identifier:completion:)

Deallocates system memory for a given asset and removes it from the engine’s list of registered assets.

## Declaration

```swift
func unregisterAsset(identifier: String, completion handler: (@Sendable (Bool) -> Void)? = nil)
```

```swift
func unregisterAsset(identifier: String) async -> Bool
```

## Parameters

- `identifier`: The unique name that the app defines for the sound asset.
- `handler`: Code that the system runs after it unregisters the asset.

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func unregisterAsset(identifier: String) async -> Bool For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Registering Sound Assets

- [registerSoundAsset(url:identifier:assetType:channelLayout:normalizationMode:)](phase/phaseassetregistry/registersoundasset(url:identifier:assettype:channellayout:normalizationmode:).md)
- [registerSoundAsset(data:identifier:format:normalizationMode:)](phase/phaseassetregistry/registersoundasset(data:identifier:format:normalizationmode:).md)
