public void addReferenceListener ( ReferenceListener listener ) { if ( this . listeners == null ) { this . listeners = new LinkedList <> ( ) ; } final List < ReferenceListener > list = this . listeners ; synchronized ( list ) { list . add ( listener ) ; } }
Add listener on reference s release .