iboB / dynamix

:fish_cake: A new take on polymorphism
MIT License
667 stars 45 forks source link

Corrupt state of message registry when unloading a plugin which defines a message #8

Closed iboB closed 7 years ago

iboB commented 7 years ago

Have a plugin which defines (and registers) a message. Unload the plugin. The message registry remains corrupt at the plugin message id.

This will lead to an assertion (and subsequently UB) when loading another plugin with messages (or reloading the same one).

The solution is to explicitly unregister messages the same way mixins are unregistered.