johntube
started a topic on Fri, 03 April 2015 at 7:10 AM
In the classes PlayFabAndroidPlugin and PlayFabGoogleCloudMessaging there are instances of AndroidJavaClass that are enclosed in a using{} block or disposed.
johntube
started a topic on Fri, 03 April 2015 at 7:10 AM
In the classes PlayFabAndroidPlugin and PlayFabGoogleCloudMessaging there are instances of AndroidJavaClass that are enclosed in a using{} block or disposed.
3 Comments
Brendan Vanous said on Fri, 03 April 2015 at 10:16 AM
Thanks, Hamza. The intent was that it would remain available throughout the life of the application, since without it running, the game would not receive notification of the message until/unless the user clicks on it. Still, it's a fair point that we should provide a way to dispose it, if the game doesn't care about that. We'll update to add this.
johntube said on Fri, 03 April 2015 at 10:17 PM
I've noticed that I didn't mention that this was related to the Unity plugin. But since I can't edit my post so I'm just apologizing for the inconvenience and also for forgetting the "not" between "are" and "enclosed".
Any objects that implement a IDisposable interface or need to be set to null can be Disposed in MonoBehaviour.OnDestroy(). At least that's what I'm doing other that the "using{}" block.
Brendan Vanous said on Fri, 03 April 2015 at 10:26 PM
Thanks again - and no worries, we knew what you meant! :)
No one has followed this question yet.