> ## 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.

# PartyXblManager::Cleanup

> Immediately reclaims all resources associated with the object.

Immediately reclaims all resources associated with the object.

## Syntax

```cpp theme={null}
PartyError Cleanup(  
)  
```

### Parameters

### Return value

PartyError

`c_partyErrorSuccess` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [GetErrorMessage()](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_geterrormessage).

## Remarks

Every call to [Initialize()](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_initialize) should have a corresponding Cleanup() call. <br /><br /> Titles using the Microsoft Game Core version of the Party XBOX Live Helper library must listen for app state notifications via the RegisterAppStateChangeNotification API. When the app is suspended, the title must call Cleanup(). When the app is resumed, the title must wait for the Game Core networking stack to be ready and then re-initialize the Party XBOX Live Helper library by calling Initialize().

## Requirements

**Header:** PartyXboxLive.h

## See also

[PartyXblManager](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/partyxblmanager)\
[PartyXblManager::Initialize](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_initialize)


## Related topics

- [PartyXblManager::Initialize](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_initialize.md)
- [PlayFab Party XBOX Live Helper Release Notes](/services/playfab/multiplayer/networking/party-xboxlive-relnotes.md)
- [PartyXblManager](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/partyxblmanager.md)
- [PartyXblManager::SetThreadAffinityMask](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_setthreadaffinitymask.md)
- [PartyXblManager::GetSingleton](/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_getsingleton.md)
