Hi Alejandro,
You should know that InfoBus subscriptions remain intact until you unsubscribe.
Even when you destroy a widget who's InfoBus subscriptions have not been unsubscribed, will it keep responding to the messages it subscribed to. In fact the widget is not really destroyed because there are still InfoBus subscriptions inside it. The latter also causes memory issues.
When you reuse widgets containing InfoBus subscriptions you should only subscribe the widget once to certain InfoBus messages. Since your widget is responding multiple times to the same InfoBus message I would expect your widget B adds a InfoBus subscription every time widget A activates it.
So, some answers to your questions:
A subscription does not automatically clear when there are no remaining subscriptions.
It doesn't matter whether you publish an InfoBus message in a library function or not.
If you would like to elaborate you will have to attach your sample project.
Kind regards,
Guus
gweis