public void destroy() { try { if (cleanupThread != null) { cleanupThread.stopThread(); } } finally { isDestroyed = true; } }