Community
Participate
Working Groups
Looking at the code for DelegatingEventSource I get the impression that it should in onEvict() in addition to removing itself as a listener to IResourceDescription.Event.Source also remove itself as a listener to the OnChangeEvictingCache. Otherwise it will remain and it also has references to IContainers which then can't be garbage collected. Did I miss something?
The cache listener serve as a helper to notify a cached value about the fact that it is no longer cached and thereby no longer valid. That's why they only work once and will be removed as a listener from the cache when the cache is evicted (see CacheAdapter). They deserve a better name - any suggestions? Did you experience any leaking containers?
No, I am just trying to understand how some things fit together. And this interaction between IResourceDescripions, IGlobalScopeProvider, and IContainer seems a bit tricky. I missed the part where the cache itself removes all attached listeners.