---
title: "create(minimumCapacity:makingHeaderWith:)"
framework: swift
role: symbol
role_heading: Type Method
path: "swift/managedbuffer/create(minimumcapacity:makingheaderwith:)"
---

# create(minimumCapacity:makingHeaderWith:)

Create a new instance of the most-derived class, calling factory on the partially-constructed object to generate an initial Header.

## Declaration

```swift
final class func create(minimumCapacity: Int, makingHeaderWith factory: (ManagedBuffer<Header, Element>) throws -> Header) rethrows -> ManagedBuffer<Header, Element>
```
