The detach() function enables you to detach from the domain referred to by $session.
This function can be used for either a session, created using InCharge::session->new(), or an observer session, created using InCharge::session->observer().
If this is used to detach a session with an active observer, the observer is also closed.
This call does not completely destroy the $session reference contents but retains enough information to allow the session to be reestablished. Thus, it is possible to call $session->reattach() to reconnect to the Domain Manager by using the same parameters as were used in the initial connection. However, the event subscriptions need to be reestablished explicitly in this event.