---
title: deallocate()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/unsafemutablepointer/deallocate()
---

# deallocate()

Deallocates the memory block previously allocated at this pointer.

## Declaration

```swift
func deallocate()
```

## Discussion

Discussion This pointer must be a pointer to the start of a previously allocated memory block. The memory must not be initialized or Pointee must be a trivial type.
