Closed erijo closed 11 years ago
I think this is a good idea, but if I'm reading it right each plugin still gets a separate copy of the signal. Wouldn't the main advantage of using a shared pointer that we could skip the copy and give all of them the same pointer? I don't think any of the plugins actually modify the signals they get so it should just be a matter of adding a few const declarations.
Good idea. I'll try to const-ify it.
I see you consted all of them. It would have been enough to only const the plugin signals as events and protocol signals are always sent to just a single plugin/protocol (with the exception of the ProtocolGroupSignal which is sent several times by the UserManager). However, now that it's done, I see no reason to undo the const declarations for the protocol signals.
Avoids memory leak in case plugin isn't ready to handle signal or it it has been shutdown