blob: 8133e047e4ffb9d01f94f9b7bae837180ff5da04 (
plain)
1
2
3
4
5
6
|
# listener-lifetime
Never a bare `wl_listener` or raw callback across a unit boundary. Subscribe
through the bus and keep the returned RAII subscription handle as a member —
destruction unsubscribes. Raw pointers received in a hook are borrows: valid
ONLY during the call, never stored. Use-after-free across contracts is this
project's #1 expected bug class; the type system is the defense.
|