@ Override public void destroy ( T instance , CreationalContext < T > creationalContext ) { super . destroy ( instance , creationalContext ) ; try { getProducer ( ) . preDestroy ( instance ) ; // WELD-1010 hack? if ( creationalContext instanceof CreationalContextImpl ) { ( ( CreationalContextImpl < T > ) creationalContext ) . release ( this , instance ) ; } else { creationalContext . release ( ) ; } } catch ( Exception e ) { BeanLogger . LOG . errorDestroying ( instance , this ) ; BeanLogger . LOG . catchingDebug ( e ) ; } }
Destroys an instance of the bean