The contract sessions one adapter instance opened that a host still holds.
A host may keep an editor (a VST3 view, an AU Cocoa view) after the plug-in instance that made it is torn down, but the editor's factory belongs to the processor. An adapter whose editors outlive it in that way declares one of these after its processor, so its destruction (or an explicit close_all()) closes every registered session while the processor and store still exist. The host still holds those windows, so each editor is closed in order (gestures released, detached, destroyed), never invalidated.
A host may dispose of the instance off the main thread. Waiting for the main thread there could deadlock a host whose main thread is waiting for that worker, so the registry does not wait: it releases every gesture and cuts each session's port from the store at once (both safe from any thread), then posts the close to the main thread, holding the sessions alive until it runs. By then the processor is gone; an editor reaches the plug-in only through its context, which refuses everything after the cut.
Sessions are held weakly: a session the host has already closed and destroyed is simply skipped, so nothing needs to unregister.