When and how does jME3 call the Client destroy() method?

Looking at the SpiderMonkey docs I see:

You must override the client’s destroy() method to close the connection cleanly when the player quits the client:

  public void destroy() {
      ... // custom code

Looking at com.jme3.network.Client's javadocs, I don’t see a destroy() method defined. So I’m wondering: What is this destroy() method, and when does the jME3 framework call it?

Not “Client” but “client”… as in the application that is the client and not the class that is the Client.

So… you have to override the client application’s destroy() method if you want to make sure you close the connection cleanly.

Ok thanks. Also just curious: Does that line of code myClient.close(); result with the registered ClientStateListener#clientDisconnected method being invoked?

I think it should… if the app doesn’t exit before the event happens.