MichaCo / CacheManager

CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
http://cachemanager.michaco.net
Apache License 2.0
2.33k stars 458 forks source link

Possible Memory Leak caused by OnCacheSpecificRemove event subscription in BaseCacheManager class #295

Closed NazmiAltun closed 4 years ago

NazmiAltun commented 4 years ago

Is it possible that the following line causes memory leak?

https://github.com/MichaCo/CacheManager/blob/4385c06a409e9736a7531c5e11003032b8a4c151/src/CacheManager.Core/BaseCacheManager.cs#L86 There is a subscription to OnCacheSpecificRemove event but in dispose method of BaseCacheManagerclass there is no unsubscribe call.

MichaCo commented 4 years ago

That's on initialization, done once ever for a CM instance.

So, no, because CM is supposed to live as singleton this will run only once ever.

NazmiAltun commented 4 years ago

In that case i am closing this issue