Community
Participate
Working Groups
3.3M5 The OverlayCache leaks the decorated image whenever the base image is disposed. This becomes a sever leak with editors that dispose all allocated resources when closing.
The OverlayCache is a remnant of the pre Resource Manager days and should be replaced by a ResourceManager. The problem is knowing when the descriptor is obsolete. If we use a ResourceManager we have to hold onto the descriptor somehow or the cache will get cleared too often. We talked this over this morning and what makes the most sense to us is for someone to use an IDecorationContext for the caller to set a ResourceManager to use for a decoration. We would then create our CompositeImageDescriptor in that ResourceManager. In cases where we are not passed a ResourceManager we would use a default one which would have the same lifecycle as what we have now. Adding Stefan as he may have some good ideas in this space.
*** Bug 182399 has been marked as a duplicate of this bug. ***
*** Bug 185321 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > The OverlayCache leaks the decorated image whenever the base image is disposed. This problem should be fixed with bug 175526 comment 10. However, I think there are still more lifecycle issues in OverlayCache, see e.g. bug 185321 comment 1.
*** Bug 216146 has been marked as a duplicate of this bug. ***
I would like a solution that works with the new ColumnLabelProvider. See Bug 182216
After a design discussion with Michael Valenta we have come up with a light weight solution that most users of decorators will get for free. I have added a key to DecorationContext called RESOURCE_MANAGER_KEY. If the context has a ResourceManager at RESOURCE_MANAGER_KEY we will now use this manager instead of the global one when caching our overlays. The global one is still there for contexts that do not provide a ResourceManager. The DecoratingLabelProvider provides one for free in it's default decoration context (we used the empty singleton before). For DecoratingLabelProviders that supply thier own (like JDTs) they will need to make a LocalResourceManager for us to use if they want this support. Note that this manager will be disposed when the DecoratingLabelProvider so make sure it is a local one backed one the one you are using. Released for build >20080129 (and thanks again Michael).
Verified in I20080205-0800
Jason please look at a test suite for this
Test suite added for build > 20080225
*** Bug 231160 has been marked as a duplicate of this bug. ***