super(); // init QTSession.open(); // create shutdown handler shutdownHook = new Thread() { public void run() { // QTSession.close(); QTSession.exitMovies(); } }; Runtime.getRuntime().addShutdownHook(shutdownHook);
// gets instance. if a new one needs to be created, // it calls QTSession.open() and creates a shutdown hook // to call QTSession.close() getInstance();
if (instance == null) instance = new QTSessionCheck(); return instance;
try { QTSessionCheck.check(); System.exit(0); } catch (QTException qte) { qte.printStackTrace(); }