Montellese / cpp-signal

Header-only pure C++11 library providing signal and slot functionality
MIT License
17 stars 6 forks source link

Auto disconect #1

Closed douglascordeiro closed 5 years ago

douglascordeiro commented 7 years ago

Hi.

There is some way to do a slot auto disconnection when the slot object is no long available?

Montellese commented 6 years ago

See https://github.com/Montellese/cpp-signal#managed-connections. Just derive your class from cpp_signal<>::slot_tracker and it should automatically take care of disconnecting all slots of the class' instances upon destruction.