question: private void remove ( ThreadGroup g ) { synchronized ( groups ) { for ( Iterator < ThreadGroup > i = groups . iterator ( ) ; i . hasNext ( ) ; ) { ThreadGroup threadGroup = i . next ( ) ; if ( threadGroup . equals ( g ) ) { i . remove ( ) ; break ; } } } destroyIfEmptyDaemon ( ) ; }
target:  Removes an immediate subgroup.