Using JavaFX Application.stop() method over Shutdownhook : <p>So im using shutdownhook to clean up, bud since its not always guaranteed that shutdownhooks thread executes , should i just push this code onto JavaFX Application Thread (method stop()) which executes every time i close my application? Code is not expensive to run its basically just close socket if not closed and kill processs if not killed.</p>

<p><strong>Is it good practice to use Application.stop() to cleanup over ShutdownHook?</strong></p>

<p>Quote from doc:</p>

<blockquote>
  <p>This method is called when the application should stop, and provides a
  convenient place to prepare for application exit and destroy
  resources. The implementation of this method provided by the
  Application class does nothing.</p>
  
  <p>NOTE: This method is called on the JavaFX Application Thread.</p>
</blockquote>

<p>Is this method only intended to clean up resources of UI? So far i dont see reason using shutdownhook over stop() at all.</p>
