Community
Participate
Working Groups
Build Identifier: Submitting a patch to fix a resource leak in the Colors view. The Colors view is used to manage color settings used by the events table. The ColorSetting object contains four Color resource instances which must be disposed when no longer required. When the user deletes a color setting in the Colors view, or overwrites color settings during an import action, the Color resources held by the color setting are never disposed. The solution is to implement a dispose() method in the ColorSetting class, and invoke it whenever the color setting is no longer needed. Reproducible: Always Steps to Reproduce: 0. Run in Debug mode and put a breakpoint in the Color(Resource) constructors and dispose() method 1. In the Colors view, add a color setting 2. Observe that four Color instances are created 3. Export the color setting to file 4. Delete the color setting 5. Observe that the Color instances are not disposed as required by their API 6. Add a new color setting 7. Import the color setting exported in step 3 8. Choose Yes to overwrite the current color settings 9. Observe that the new color setting Color instances are not disposed
Created attachment 197180 [details] Proposed patch in org.eclipse.linuxtools.tmf.ui package Legal Message: I, Patrick Tasse, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. I am authorized by my employer to make this contribution under the EPL.
Note that we cannot accept patches for inclusion in Indigo at this time as our IP log has already been submitted. We will happily include such patches (or run them through the IP process if they are > 250 lines) post-Indigo for potential inclusion in our Indigo SR1 contribution and any Linux Tools releases in between Indigo and Indigo SR1.
Comment on attachment 197180 [details] Proposed patch in org.eclipse.linuxtools.tmf.ui package Patch merged
Planned for 0.8.1
Has this been cherry-picked to stable-0.8?
Fix committed on stable-0.8 branch.
Delivered with 0.8.1