public void endPermanent ( AddOnModel addOnModel ) { if ( ! isUsing . get ( ) || ( permanentAddOn != null && ! permanentAddOn . equals ( addOnModel ) ) ) return ; synchronized ( permanentUserReadWriteLock ) { permanentAddOn = null ; Identification tempID = this . knownIdentification ; this . knownIdentification = null ; if ( permanentLines != null ) { permanentLines . forEach ( weakReferenceLine -> { if ( weakReferenceLine . get ( ) != null ) weakReferenceLine . get ( ) . setToNonPermanent ( ) ; } ) ; nonPermanent . put ( addOnModel , permanentLines ) ; permanentLines = null ; } stopAddon ( tempID ) ; endWaitingForUsage ( ) ; isUsing . set ( false ) ; } }
unregisters the AddonModel as permanent