Edit

PlayFabMultiplayer.Uninitialize method

Important

XBOX Docs are now on docs.xbox.com! This page is kept as an archive and is no longer being updated. Visit our documentation on docs.xbox.com for the latest information and updates.

Visit the latest docs on docs.xbox.com

Immediately reclaims all resources associated with all Multiplayer library objects.

public static void Uninitialize()

Remarks

If local users were participating in a Lobby, they are removed (it appears to remote lobby clients as if network connectivity to these users has been lost), so best practice is to call Leave on all lobbies and wait for the corresponding OnLobbyLeaveCompleted event to have the local users exit any existing lobbies.

This method is not thread-safe and may not be called concurrently with other Multiplayer library methods. After calling this method, all Multiplayer library state is invalidated.

Titles using the Microsoft Game Core version of the Multiplayer library must listen for app state notifications via the RegisterAppStateChangeNotification API. When the app is suspended, the title must call Uninitialize(). When the app is resumed, the title must wait for the Game Core networking stack to be ready and then re-initialize the Multiplayer library by calling Initialize().

Every call to Initialize should have a corresponding Uninitialize() call.

See Also