I’m using a TableListBox with a custom row component. Each row component is registered as a TableHeaderComponent::Listener so it gets notified when columns are resized and can change its layout accordingly. I’m doing all of that in what I think is a pretty standard way: each row component adds itself as a listener in its constructor, and removes itself in its destructor.
This works without any issues while my app is running, but whenever I now quit it I get a crash that’s triggered by my row component trying to remove itself as a listener. I’m assuming the issue is that the TableHeaderComponent is already destroyed by the time a row tries to remove itself.
Surely it’s a common scenario that a broadcaster might be deleted before one of its listeners. How do you guys deal with that?