Skip to content
Snippets Groups Projects
Commit 8e96f243 authored by Raul Radu's avatar Raul Radu
Browse files

[Core] Changed MessageBroker subscription handling and Module creation and handling

- modules are instanciated as shared pointers and so have to be stored somewhere in order to keep the module active. This explicity asks the user to keep track of the module.
- Implemented responsibility delegation from MessageBroker to subscriber to maintain subscription active.
This is achieved by creating an object of type Subscription and then returning to the user. This object that is returned as a unique_ptr will unsubscribe automatically from the message broker
preventing the program to crash when a module is deleted and it didn't manually unsubscribe as it happened before.
parent 31f292aa
Branches
Tags
Loading
Showing
with 166 additions and 133 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment