close
Permanently dispose this session and release its native, screen, and image state. Closing is synchronous and idempotent, and does not initialize an unused terminal. Stop session I/O and detach its UI before closing. A temporary UI detachment does not end a session. Mutations and content queries throw IllegalStateException after close; scalar configuration and dimensions remain readable.