---
title: deinitialize()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/slice/deinitialize()
---

# deinitialize()

Deinitializes every instance in this buffer slice.

## Declaration

```swift
@discardableResult func deinitialize<Element>() -> UnsafeMutableRawBufferPointer where Base == UnsafeMutableBufferPointer<Element>
```

## Return Value

Return Value A raw buffer to the same range of memory as this buffer. The range of memory is still bound to Element.

## Discussion

Discussion The region of memory underlying this buffer slice must be fully initialized. After calling deinitialize(count:), the memory is uninitialized, but still bound to the Element type. note: All buffer elements must already be initialized.
