Type Reason Java.Lang.IllegalThreadStateException if this thread group or any of its subgroups has been destroyed already or if it still contains threads.
Destroys this thread group and recursively all its subgroups. It is only legal to destroy a ThreadGroup that has no threads in it. Any daemon ThreadGroup is destroyed automatically when it becomes empty (no threads or thread groups in it).