question

brendan avatar image
brendan asked

AndroidJavaClass not 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.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

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! :)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.