---
title: "gss_create_empty_buffer_set(_:_:)"
framework: GSS
role: symbol
role_heading: Function
platforms: [iOS 5.0+, iPadOS 5.0+, Mac Catalyst 13.1+, macOS 10.7+, visionOS 1.0+]
path: "gss/gss_create_empty_buffer_set(_:_:)"
---

# gss_create_empty_buffer_set(_:_:)

Allocates an empty buffer set descriptor that you use to manage an array of buffers.

## Declaration

```swift
func gss_create_empty_buffer_set(_ minor_status: UnsafeMutablePointer<OM_uint32>, _ buffer_set: UnsafeMutablePointer<gss_buffer_set_t?>) -> OM_uint32
```

## Parameters

- `minor_status`: A pointer to the secondary status result that provides additional information in case of failure. Typically, a failure results from an inability to allocate memory which is communicated by the minor status doc://com.apple.documentation/documentation/Foundation/POSIXError/ENOMEM.
- `buffer_set`: A pointer to a buffer set descriptor reference. When the function successfully allocates a buffer set descriptor, it sets the reference to point at it. The descriptor itself is initialized with zero length and a NULL pointer. On failure, the reference is unchanged.

## Mentioned in

Allocating and Releasing Objects

## Return Value

Return Value A status code set to GSS_S_COMPLETE on success, or GSS_S_FAILURE otherwise. Inspect the minor_status parameter for additional information on failure.

## Discussion

Discussion This function allocates memory for the data structure that you use to manage an array of buffers, consisting of a length parameter and a pointer. It does not allocate memory for any actual buffers. When you’re done with the buffer set descriptor created by this function, call gss_release_buffer_set(_:_:) to free its memory, as well as that of any buffers it contains at that time.

## See Also

### Allocation and Deallocation

- [gss_add_buffer_set_member(_:_:_:)](gss/gss_add_buffer_set_member(_:_:_:).md)
- [gss_release_buffer(_:_:)](gss/gss_release_buffer(_:_:).md)
- [gss_release_buffer_set(_:_:)](gss/gss_release_buffer_set(_:_:).md)
