> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblCleanupAsync

> XblCleanupAsync

# XblCleanupAsync

Immediately reclaims all resources associated with the library.

## Syntax

```cpp theme={null}
HRESULT XblCleanupAsync(  
         XAsyncBlock* async  
)  
```

### Parameters

*async*   \
Type: XAsyncBlock\*

The AsyncBlock for this operation.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

If you called XblMemSetFunctions(), call this before shutting down your app's memory manager. It is the responsibility of the game to wait for any outstanding Async calls to complete before calling XblCleanup. If there are background async tasks started by XSAPI pending, this API will wait for them to complete.

## Requirements

**Header:** xbox\_live\_global\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[xbox\_live\_global\_c](/reference/live/xsapi-c/xbox_live_global_c/xbox_live_global_c_members)


## Related topics

- [How to use XBOX Services APIs (XSAPIs)](/services/xbox-services/fundamentals/xbox-services-api/live-gs-xbl-apis.md)
- [HCCleanupAsync](/reference/live/httpclient/httpclient/functions/hccleanupasync.md)
- [HCCleanup](/reference/live/httpclient/httpclient/functions/hccleanup.md)
- [PartyXblManager::Cleanup](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_cleanup.md)
- [HCTraceCleanup](/reference/live/httpclient/trace/functions/hctracecleanup.md)
