pub fn keeps_instance_registry(def: &ComponentDef<'_>) -> boolExpand description
Whether this component keeps a live-instance registry (__KEYS_<C> / __SEEN_<C>).
★ ONE PREDICATE, EVERY READER. Four places have to agree about this — the registry declarations, the per-paint STAMP that records an instance as drawn, the unmount SWEEP that walks for instances that were not, and the pass counter both of those read. They were three separate conditions, and the moment one of them said yes while the stamp said no, the sweep saw every LIVE instance as gone and cleared its state on the next paint. A predicate they all ask cannot drift that way.
State is on the list because an instance that leaves must take its state with it: without a
registry nothing notices it vanished, __S_<C>_<field> kept the entry, and a remount under the
same key resurrected the old value.