Subscriber::shutdown() required to be called manually on destruction?
TL;DR
Is calling Subscriber::shutdown() explicitly required to prevent callbacks from being called after object destruction?
TS;DU (too short, didn't understand)
I've recently been doing some work were objects containing subscribers are created and destroyed while the node is still running. At the same time I've been getting crashes in my code that imply that the callbacks connected to said subscribers are being called seemingly after the subscriber has been destroyed, and thus causing segfaults and memory corruptions when that callback accesses member data.
Upon noticing this I started explicitly calling Subscriber::shutdown() in my destructors and the problem crashes stopped. Previously I had assumed Subscriber::~Subscriber() would have taken care of this. I looked at the code and Subscriber::shutdown() is not explicitly called.
So is this the expected behavior? Is this a bug?
If I'm able to, will do.