Shutting Down the Application

When the application is going to exit, it may call the shutdown method of the Listener to record any partial summary blocks and guarantee that the final gathered performance data will not be lost:

listener.shutdown();

However, it is not necessary for the application to directly call shutdown as the finalize method of the Listener object will also call shutdown.

Attention: If the application exits without calling either the finalize method of the Listener or shutdown, then the most recent performance data which was being added to the current summary block will be lost, but there will be no other negative consequences.