Scoped connection for ChangeBroadcaster?


#1

I use boost::signals2 for most of my signalling needs, and this has a useful ScopedConnection type, that basically unregisters a change listener from a broadcaster when the listener is deleted.

Is there an equivalent in JUCE? I know that I can just unregister the listener in the listener’s dtor, but this means (a) having to remember to do it, and (b) having to keeping a pointer around to the broadcaster. Am I missing anything?