/** * Calls {@link #doDestroy()} where you have to put your destroy code in, * and clears default properties. Once this method is invoked, {@link #isInitialized()} * will return <tt>false</tt>. */ public final void destroy() { if ( cfg == null ) { // Already destroyed. return; } try { doDestroy(); } finally { initialized = false; factoryCfg = null; cfg = null; } }