@ Deprecated public static < T > T releaseLater ( T msg , int decrement ) { if ( msg instanceof ReferenceCounted ) { ThreadDeathWatcher . watch ( Thread . currentThread ( ) , new ReleasingTask ( ( ReferenceCounted ) msg , decrement ) ) ; } return msg ; }
Schedules the specified object to be released when the caller thread terminates . Note that this operation is intended to simplify reference counting of ephemeral objects during unit tests . Do not use it beyond the intended use case .