Use a weak pointer to reference Session instances.
Instead of storing a pointer to the Session in each operator, store a weak reference to the Session. This way, the session can be destroyed while Operator instances remain without causing crashes on exit.