Table of Contents

Dispose

Methods
public void Dispose()

Removes this player account from the list of all player accounts, logs them out from coherence Cloud, and releases all resources used by it.

Remarks

Disposal is reference-counted (see Coherence.Cloud.PlayerAccount.OwnerCount): each successful login adds one owner, and each call to this method removes one. The account, its cloud services, and its entry in All are only torn down once the count reaches zero.

Call this (once) for each login you performed, when you no longer need the account. Do not dispose accounts you merely obtained a reference to without logging in — for example via Main, All, Find(Predicate<PlayerAccount>), or FindAll(Predicate<PlayerAccount>) — and do not dispose Services directly; it is released here when the owner count reaches zero.