Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328095 - remove DelegatingEventSource as OnChangeEvictingCache.Listener
Summary: remove DelegatingEventSource as OnChangeEvictingCache.Listener
Status: CLOSED INVALID
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-19 02:43 EDT by Knut Wannheden CLA
Modified: 2010-10-19 03:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Wannheden CLA 2010-10-19 02:43:36 EDT
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?
Comment 1 Sebastian Zarnekow CLA 2010-10-19 03:07:31 EDT
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?
Comment 2 Knut Wannheden CLA 2010-10-19 03:27:47 EDT
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.