If you have a MessageHub for the entire lifetime of your application and threads are being created and terminated, each thread with a Subscription / Unsubscription or Publish will make the ThreadLocal.Values collection to grow.
I've found out the issue with a .NET 4.7 WPF application and Easy.MessageHub version 5.0.0.0
Also ThreadLocal.Values getter started to take longer and longer.
After few days of running, I had 6632 Instances of "Easy.MessageHub.Subscription[]" and calling Unsubscribe took more than a minute.
If you have a MessageHub for the entire lifetime of your application and threads are being created and terminated, each thread with a Subscription / Unsubscription or Publish will make the ThreadLocal.Values collection to grow.
I've found out the issue with a .NET 4.7 WPF application and Easy.MessageHub version 5.0.0.0
Also ThreadLocal.Values getter started to take longer and longer. After few days of running, I had 6632 Instances of "Easy.MessageHub.Subscription[]" and calling Unsubscribe took more than a minute.