---
title: "gss_release_cred(_:_:)"
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_release_cred(_:_:)"
---

# gss_release_cred(_:_:)

Releases the memory of a credential.

## Declaration

```swift
func gss_release_cred(_ minor_status: UnsafeMutablePointer<OM_uint32>, _ cred_handle: UnsafeMutablePointer<gss_cred_id_t?>) -> OM_uint32
```

## Parameters

- `minor_status`: A pointer to the secondary status result that provides additional information in case of failure.
- `cred_handle`: The credential whose memory should be freed.

## Mentioned in

Allocating and Releasing Objects

## Return Value

Return Value A status code set to GSS_S_COMPLETE on success. See Function Status for a description of other status outputs.

## Discussion

Discussion This function frees the memory associated with the credential, but doesn’t necessarily purge that memory of the credential’s data. If you need to ensure no trace of the credential remains in memory, use gss_destroy_cred(_:_:) instead. That function first removes the credential data from memory and then frees the memory using a call to this function.

## See Also

### Creation and Deletion

- [gss_init_sec_context(_:_:_:_:_:_:_:_:_:_:_:_:_:)](gss/gss_init_sec_context(_:_:_:_:_:_:_:_:_:_:_:_:_:).md)
- [gss_accept_sec_context(_:_:_:_:_:_:_:_:_:_:_:)](gss/gss_accept_sec_context(_:_:_:_:_:_:_:_:_:_:_:).md)
- [gss_delete_sec_context(_:_:_:)](gss/gss_delete_sec_context(_:_:_:).md)
- [gss_process_context_token(_:_:_:)](gss/gss_process_context_token(_:_:_:).md)
- [gss_set_sec_context_option(_:_:_:_:)](gss/gss_set_sec_context_option(_:_:_:_:).md)
